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
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2010-03-10 18:39:52 +0300
committerChristopher Faylor <me@cgf.cx>2010-03-10 18:39:52 +0300
commitc2fe02c48b7edc0e26ce788acfd3d01b58ad6983 (patch)
tree754fc27043c7aedba6b67b382d994b9afbfed00a
parentbd3b3783f8d2b80eef694324c6d0c143613b05be (diff)
* shared.cc (memory_init): Fix comment. Fix indentation.
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/shared.cc23
2 files changed, 16 insertions, 11 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 7532faa6c..f7f1f507c 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,7 @@
+2010-03-10 Christopher Faylor <me.cygwin@cgf.cx>
+
+ * shared.cc (memory_init): Fix comment. Fix indentation.
+
2010-03-09 Christopher Faylor <me+cygwin@cgf.cx>
* shared_info.h (open_shared): Create function wrapper for common use
diff --git a/winsup/cygwin/shared.cc b/winsup/cygwin/shared.cc
index 03118daf0..4a2489222 100644
--- a/winsup/cygwin/shared.cc
+++ b/winsup/cygwin/shared.cc
@@ -417,7 +417,7 @@ memory_init (bool init_cygheap)
cygheap->user.init ();
}
- /* Initialize general shared memory */
+ /* Initialize general shared memory under spinlock control */
for (;;)
{
LONG smi = InterlockedExchange (&shared_mem_inited, -1);
@@ -437,16 +437,17 @@ memory_init (bool init_cygheap)
cygwin_shared_h,
sizeof (*cygwin_shared),
SH_CYGWIN_SHARED);
- if (!smi)
- {
- cygwin_shared->initialize ();
- /* Defer debug output printing the installation root and installation key
- up to this point. Debug output except for system_printf requires
- the global shared memory to exist. */
- debug_printf ("Installation root: <%W> key: <%S>",
- installation_root, &installation_key);
- smi = 1;
- }
+ if (!smi)
+ {
+ cygwin_shared->initialize ();
+ /* Defer debug output printing the installation root and installation key
+ up to this point. Debug output except for system_printf requires
+ the global shared memory to exist. */
+ debug_printf ("Installation root: <%W> key: <%S>",
+ installation_root, &installation_key);
+ smi = 1;
+ }
+
InterlockedExchange (&shared_mem_inited, smi);
break;
}