aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/fork.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2015-12-02 12:31:40 +0100
committerCorinna Vinschen <corinna@vinschen.de>2015-12-02 12:31:40 +0100
commit8974e06da3c0214613aa27dc08e1de2b02e27231 (patch)
tree7b31558e4330b2c743b900cac520d28391633612 /winsup/cygwin/fork.cc
parent7b0c063f12f09e211391cd0f103e085f390d9f23 (diff)
downloadnewlib-8974e06da3c0214613aa27dc08e1de2b02e27231.zip
newlib-8974e06da3c0214613aa27dc08e1de2b02e27231.tar.gz
newlib-8974e06da3c0214613aa27dc08e1de2b02e27231.tar.bz2
Rename parent stack members in child_info struct to align with OS names
* child_info.h (CURR_CHILD_INFO_MAGIC): Align to below change. (class child_info_fork): Rename stacktop to stacklimit. Rename stackbottom to stackbase. Accommodate name change throughout Cygwin. Rephrase comments to be clearer. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/fork.cc')
-rw-r--r--winsup/cygwin/fork.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc
index 78ae932..d4a973e 100644
--- a/winsup/cygwin/fork.cc
+++ b/winsup/cygwin/fork.cc
@@ -307,7 +307,7 @@ frok::parent (volatile char * volatile stack_here)
ch.forker_finished = forker_finished;
- ch.stackbottom = NtCurrentTeb()->Tib.StackBase;
+ ch.stackbase = NtCurrentTeb()->Tib.StackBase;
ch.stackaddr = NtCurrentTeb ()->DeallocationStack;
if (!ch.stackaddr)
{
@@ -315,25 +315,25 @@ 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.stacktop = NtCurrentTeb()->Tib.StackLimit;
+ ch.stackaddr = ch.stacklimit = NtCurrentTeb()->Tib.StackLimit;
ch.guardsize = (size_t) -1;
}
else
{
/* Otherwise we're running on a system-allocated stack. Since stack_here
is the address of the stack pointer we start the child with anyway, we
- can set ch.stacktop to this value rounded down to page size. The
+ can set ch.stacklimit to this value rounded down to page size. The
child will not need the rest of the stack anyway. Guardsize depends
on whether we're running on a pthread or not. If pthread, we fetch
the guardpage size from the pthread attribs, otherwise we use the
system default. */
- ch.stacktop = (void *) ((uintptr_t) stack_here & ~wincap.page_size ());
+ ch.stacklimit = (void *) ((uintptr_t) stack_here & ~wincap.page_size ());
ch.guardsize = (&_my_tls != _main_tls && _my_tls.tid)
? _my_tls.tid->attr.guardsize
: wincap.def_guard_page_size ();
}
debug_printf ("stack - bottom %p, top %p, addr %p, guardsize %ly",
- ch.stackbottom, ch.stacktop, ch.stackaddr, ch.guardsize);
+ ch.stackbase, ch.stacklimit, ch.stackaddr, ch.guardsize);
PROCESS_INFORMATION pi;
STARTUPINFOW si;
@@ -475,7 +475,7 @@ frok::parent (volatile char * volatile stack_here)
impure_end = _impure_ptr + 1;
}
rc = child_copy (hchild, true,
- "stack", stack_here, ch.stackbottom,
+ "stack", stack_here, ch.stackbase,
impure, impure_beg, impure_end,
NULL);