diff options
Diffstat (limited to 'winsup/cygwin/pinfo.cc')
-rw-r--r-- | winsup/cygwin/pinfo.cc | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index e3723f863..a9a0b80e7 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -30,6 +30,7 @@ details. */ #include "shared_info.h" #include "cygheap.h" #include "fhandler.h" +#include "cygmalloc.h" static char NO_COPY pinfo_dummy[sizeof (_pinfo)] = {0}; @@ -755,22 +756,14 @@ winpids::enum9x (bool winpid) return nelem; } -NO_COPY CRITICAL_SECTION winpids::cs; - void winpids::set (bool winpid) { - EnterCriticalSection (&cs); + __malloc_lock (); npids = (this->*enum_processes) (winpid); if (pidlist) pidlist[npids] = 0; - LeaveCriticalSection (&cs); -} - -void -winpids::init () -{ - InitializeCriticalSection (&cs); + __malloc_unlock (); } DWORD |