12 #include <ecl/config/ecl.hpp> 13 #if defined(ECL_IS_WIN32) 20 #include "../../include/ecl/threads/mutex_w32.hpp" 32 Mutex::Mutex(
const bool locked) : number_locks(0) {
33 InitializeCriticalSection(&
mutex);
40 DeleteCriticalSection(&
mutex);
44 InterlockedIncrement((
long*)&number_locks);
45 EnterCriticalSection(&
mutex);
48 bool Mutex::trylock(
Duration &duration) {
52 bool Mutex::trylock() {
61 LeaveCriticalSection( &
mutex );
62 InterlockedDecrement((
long*)&number_locks);
Embedded control libraries.