summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/dll_init.h
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/dll_init.h')
-rw-r--r--winsup/cygwin/dll_init.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/winsup/cygwin/dll_init.h b/winsup/cygwin/dll_init.h
index b37406e82..d14cc6cb9 100644
--- a/winsup/cygwin/dll_init.h
+++ b/winsup/cygwin/dll_init.h
@@ -72,6 +72,7 @@ class dll_list
dll *end;
dll *hold;
dll_type hold_type;
+ static muto protect;
public:
dll start;
int tot;
@@ -90,13 +91,22 @@ public:
break;
return hold;
}
+
dll *istart (dll_type t)
{
hold_type = t;
hold = &start;
return inext ();
}
+ void guard(bool lockit)
+ {
+ if (lockit)
+ protect.acquire ();
+ else
+ protect.release ();
+ }
friend void dll_global_dtors ();
+ dll_list () { protect.init ("dll_list"); }
};
extern dll_list dlls;