--- parser3/src/main/pa_threads.C 2001/01/29 11:17:50 1.1 +++ parser3/src/main/pa_threads.C 2001/01/29 11:53:42 1.2 @@ -1,11 +1,13 @@ /* - $Id: pa_threads.C,v 1.1 2001/01/29 11:17:50 paf Exp $ + $Id: pa_threads.C,v 1.2 2001/01/29 11:53:42 paf Exp $ */ #include "pa_threads.h" #ifdef MULTITHREAD +Mutex global_mutex; + // either apache module or win32 prog for now #ifdef MOD_PARSER # include "ap_config.h" @@ -24,11 +26,11 @@ Mutex::~Mutex() { ap_destroy_mutex(reinterpret_cast(handle)); } -void Mutex::lock() { +void Mutex::acquire() { ap_acquire_mutex(reinterpret_cast(handle)); } -void Mutex::unlock() { +void Mutex::release() { ap_release_mutex(reinterpret_cast(handle)); } @@ -42,11 +44,11 @@ Mutex::~Mutex() { CloseHandle(handle); } -void Mutex::lock() { +void Mutex::acquire() { WaitForSingleObject(handle, INFINITE); } -void Mutex::unlock() { +void Mutex::release() { ReleaseMutex(handle); }