summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/autoload.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2004-06-22 04:00:16 +0000
committerChristopher Faylor <me@cgf.cx>2004-06-22 04:00:16 +0000
commitc0508da25acd6cdfb19e25eead5906d37743a925 (patch)
tree1f6dfb9c931c860d8f27a8cacf6e194f632426a6 /winsup/cygwin/autoload.cc
parent10800ca5f583d5c6b75dd8799b7b392bd4d3da91 (diff)
downloadcygnal-c0508da25acd6cdfb19e25eead5906d37743a925.tar.gz
cygnal-c0508da25acd6cdfb19e25eead5906d37743a925.tar.bz2
cygnal-c0508da25acd6cdfb19e25eead5906d37743a925.zip
* autoload.cc (wsock_init): Keep lock while modifying return address.
Diffstat (limited to 'winsup/cygwin/autoload.cc')
-rw-r--r--winsup/cygwin/autoload.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/autoload.cc b/winsup/cygwin/autoload.cc
index f2d46d1b3..6062f7e21 100644
--- a/winsup/cygwin/autoload.cc
+++ b/winsup/cygwin/autoload.cc
@@ -278,13 +278,13 @@ wsock_init ()
}
}
- InterlockedDecrement (&here);
-
/* Kludge alert. Redirects the return address to dll_chain. */
__asm__ __volatile__ (" \n\
movl $dll_chain,4(%ebp) \n\
");
+ InterlockedDecrement (&here);
+
volatile retchain ret;
/* Set "arguments for dll_chain. */
ret.low = (long) dll_func_load;