22 #include "runtime.hpp"
34 InitializeCriticalSection(&cs_);
40 DeleteCriticalSection(&cs_);
44 Mutex::Lock::Lock(
Mutex& lm) : mutex_(lm)
46 EnterCriticalSection(&mutex_.cs_);
52 LeaveCriticalSection(&mutex_.cs_);
59 pthread_mutex_init(&mutex_, 0);
65 pthread_mutex_destroy(&mutex_);
69 Mutex::Lock::Lock(
Mutex& lm) : mutex_(lm)
71 pthread_mutex_lock(&mutex_.mutex_);
77 pthread_mutex_unlock(&mutex_.mutex_);
82 #endif // MULTI_THREADED