36 namespace rp{
namespace hal{
63 switch (WaitForSingleObject(
_lock, timeout==0xFFFFFFF?INFINITE:(DWORD)timeout))
79 if (timeout == 0xFFFFFFFF){
83 else if (timeout == 0)
92 gettimeofday(&now,NULL);
94 wait_time.tv_sec = timeout/1000 + now.tv_sec;
95 wait_time.tv_nsec = (timeout%1000)*1000000 + now.tv_usec*1000;
97 if (wait_time.tv_nsec >= 1000000000)
100 wait_time.tv_nsec -= 1000000000;
102 switch (pthread_mutex_timedlock(&
_lock,&wait_time))
122 pthread_mutex_unlock(&
_lock);
144 _lock = CreateMutex(NULL,FALSE,NULL);
146 pthread_mutex_init(&
_lock, NULL);
158 pthread_mutex_destroy(&
_lock);
Locker::LOCK_STATUS lock(unsigned long timeout=0xFFFFFFFF)
pthread_mutex_t * getLockHandle()