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:
authorChristopher Faylor <me@cgf.cx>2011-05-30 10:24:53 +0400
committerChristopher Faylor <me@cgf.cx>2011-05-30 10:24:53 +0400
commit3a88e09e7f7239cba1cd7d9f292b0741b6ff2fd6 (patch)
treeb0bf80198c8ea1dd5d80b3a94eb7018615321309 /winsup
parent57b670586c611b70bf6043f39d9a650885b3c4ae (diff)
* cygheap.cc (cygheap_dummy): Rename from cygheap_at_start.
(cygheap): Accommodate name change to cygheap_dummy. (cygheap_init): Ditto. (cygheap_fixup_in_child): Simplify slightly. * fork.cc (fork): Add an advisory comment.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog8
-rw-r--r--winsup/cygwin/cygheap.cc9
-rw-r--r--winsup/cygwin/fork.cc1
3 files changed, 13 insertions, 5 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index ccc8412eb..5d377ebbc 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,11 @@
+2011-05-30 Christopher Faylor <me.cygwin2011@cgf.cx>
+
+ * cygheap.cc (cygheap_dummy): Rename from cygheap_at_start.
+ (cygheap): Accommodate name change to cygheap_dummy.
+ (cygheap_init): Ditto.
+ (cygheap_fixup_in_child): Simplify slightly.
+ * fork.cc (fork): Add an advisory comment.
+
2011-05-29 Christopher Faylor <me.cygwin2011@cgf.cx>
* fhandler.cc (fhandler_overlapped::wait_overlapped): Make sure that
diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc
index 8a2a1f4dc..35d133a2b 100644
--- a/winsup/cygwin/cygheap.cc
+++ b/winsup/cygwin/cygheap.cc
@@ -26,12 +26,12 @@
#include <unistd.h>
#include <wchar.h>
-static mini_cygheap NO_COPY cygheap_at_start =
+static mini_cygheap NO_COPY cygheap_dummy =
{
{__utf8_mbtowc, __utf8_wctomb}
};
-init_cygheap NO_COPY *cygheap = (init_cygheap *) &cygheap_at_start;
+init_cygheap NO_COPY *cygheap = (init_cygheap *) &cygheap_dummy;
void NO_COPY *cygheap_max;
extern "C" char _cygheap_end[];
@@ -61,8 +61,7 @@ static void *__stdcall _csbrk (int);
void __stdcall
cygheap_fixup_in_child (bool execed)
{
- cygheap_max = child_proc_info->cygheap;
- cygheap = (init_cygheap *) cygheap_max;
+ cygheap_max = cygheap = (init_cygheap *) _cygheap_start;
_csbrk ((char *) child_proc_info->cygheap_max - (char *) cygheap);
child_copy (child_proc_info->parent, false, "cygheap", cygheap, cygheap_max, NULL);
cygheap_init ();
@@ -156,7 +155,7 @@ void __stdcall
cygheap_init ()
{
cygheap_protect.init ("cygheap_protect");
- if (cygheap == &cygheap_at_start)
+ if (cygheap == &cygheap_dummy)
{
cygheap = (init_cygheap *) memset (_cygheap_start, 0,
sizeof (*cygheap));
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc
index 3ec7fa8c5..9e34da60c 100644
--- a/winsup/cygwin/fork.cc
+++ b/winsup/cygwin/fork.cc
@@ -601,6 +601,7 @@ extern "C" int
fork ()
{
frok grouped;
+ /* No cygheap allocation beyond this point. */
debug_printf ("entering");
grouped.load_dlls = 0;