diff options
author | Christopher Faylor <me@cgf.cx> | 2010-03-18 22:10:11 +0300 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2010-03-18 22:10:11 +0300 |
commit | 60698cf37a5b5ad8e486fddef48528cf19209c36 (patch) | |
tree | 628ab1196a4116602b877e9a69221a402fb85844 /winsup/cygwin/shared.cc | |
parent | cb03d2f771c46854e707020e5f7b771e813effa2 (diff) |
* shared.cc (init_installation_root): Change to make sure that scope of the
lock lasts the entire function.
Diffstat (limited to 'winsup/cygwin/shared.cc')
-rw-r--r-- | winsup/cygwin/shared.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/shared.cc b/winsup/cygwin/shared.cc index 4ef8807aa..10d03b088 100644 --- a/winsup/cygwin/shared.cc +++ b/winsup/cygwin/shared.cc @@ -67,7 +67,8 @@ static LONG installation_root_inited __attribute__((section (".cygwin_dll_common void inline init_installation_root () { - if (!spinlock (installation_root_inited)) + spinlock iri (installation_root_inited); + if (!iri) { if (!GetModuleFileNameW (cygwin_hmodule, installation_root, PATH_MAX)) api_fatal ("Can't initialize Cygwin installation root dir.\n" |