Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2015-12-03 14:59:56 +0300
committerCorinna Vinschen <corinna@vinschen.de>2015-12-03 15:30:51 +0300
commit81e6c7515da61c8dc8426804f1eeb25981b13d55 (patch)
tree3745d238177aef319e3ed37f372025de8dcd4945 /winsup
parent111f32f4ba709be038234fbc7f0254b8f6506564 (diff)
Cleanup in dcrt0.cc and fork.cc
* dcrt0.cc (child_info_fork::alloc_stack): Fix formatting. * fork.cc (frok::parent): Fix formatting. (child_copy): Change type of res to BOOL. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/dcrt0.cc6
-rw-r--r--winsup/cygwin/fork.cc6
3 files changed, 12 insertions, 6 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 03cc4e28b..149270a9c 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,11 @@
2015-12-03 Corinna Vinschen <corinna@vinschen.de>
+ * dcrt0.cc (child_info_fork::alloc_stack): Fix formatting.
+ * fork.cc (frok::parent): Fix formatting.
+ (child_copy): Change type of res to BOOL.
+
+2015-12-03 Corinna Vinschen <corinna@vinschen.de>
+
* crt0.cc (dll_crt0_1): Always restore the TEB stack info. Especially
restore DeallocationStack. Fix comment.
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index 9140fa084..a34f64365 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -472,9 +472,9 @@ child_info_fork::alloc_stack ()
/* Fork has been called from main thread. Simply commit the region
of the stack commited in the parent but not yet commited in the
child and create new guardpages. */
- if (NtCurrentTeb()->Tib.StackLimit > stacklimit)
+ if (NtCurrentTeb ()->Tib.StackLimit > stacklimit)
{
- SIZE_T commitsize = (PBYTE) NtCurrentTeb()->Tib.StackLimit
+ SIZE_T commitsize = (PBYTE) NtCurrentTeb ()->Tib.StackLimit
- (PBYTE) stacklimit;
if (!VirtualAlloc (stacklimit, commitsize, MEM_COMMIT, PAGE_READWRITE))
api_fatal ("can't commit child memory for stack %p(%ly), %E",
@@ -484,7 +484,7 @@ child_info_fork::alloc_stack ()
MEM_COMMIT, PAGE_READWRITE | PAGE_GUARD))
api_fatal ("fork: couldn't allocate new stack guard page %p, %E",
guardpage);
- NtCurrentTeb()->Tib.StackLimit = stacklimit;
+ NtCurrentTeb ()->Tib.StackLimit = stacklimit;
}
/* This only affects forked children of a process started from a native
64 bit process, but it doesn't hurt to do it unconditionally. Fix
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc
index 158186781..e7b9ea441 100644
--- a/winsup/cygwin/fork.cc
+++ b/winsup/cygwin/fork.cc
@@ -308,7 +308,7 @@ frok::parent (volatile char * volatile stack_here)
ch.forker_finished = forker_finished;
ch.from_main = &_my_tls == _main_tls;
- ch.stackbase = NtCurrentTeb()->Tib.StackBase;
+ ch.stackbase = NtCurrentTeb ()->Tib.StackBase;
ch.stackaddr = NtCurrentTeb ()->DeallocationStack;
if (!ch.stackaddr)
{
@@ -316,7 +316,7 @@ frok::parent (volatile char * volatile stack_here)
stack. If so, the entire stack is committed anyway and StackLimit
points to the allocation address of the stack. Mark in guardsize that
we must not set up guard pages. */
- ch.stackaddr = ch.stacklimit = NtCurrentTeb()->Tib.StackLimit;
+ ch.stackaddr = ch.stacklimit = NtCurrentTeb ()->Tib.StackLimit;
ch.guardsize = (size_t) -1;
}
else
@@ -683,7 +683,7 @@ child_copy (HANDLE hp, bool write, ...)
SIZE_T done = 0;
if (here + todo > high)
todo = high - here;
- int res;
+ BOOL res;
if (write)
res = WriteProcessMemory (hp, here, here, todo, &done);
else