31 #ifndef GENAPI_GCSYNCH_H 32 #define GENAPI_GCSYNCH_H 40 #elif defined (__GNUC__) && (defined (__linux__) || defined (__APPLE__)) 41 # include <semaphore.h> 45 #elif defined(VXWORKS) 49 # error No/unknown platform thread support 91 CRITICAL_SECTION m_csObject;
93 #elif defined (__GNUC__) && (defined (__linux__) || defined (__APPLE__)) 94 pthread_mutex_t m_mtxObject;
96 #elif defined(VXWORKS) 99 # error No/unknown platform thread support 112 # if defined (_WIN32) 120 # elif defined (__GNUC__) && (defined (__linux__) || defined (__APPLE__) || defined(VXWORKS)) 123 # error No/unknown platform support 168 template<
class Object>
200 return Lock( *
this );
217 #if defined(_WIN32) && ! defined(PHARLAP_WIN32) 234 bool IsValid(
void)
const;
237 bool Lock(
unsigned int timeout_ms);
245 #if defined (__GNUC__) && (defined (__linux__) || defined (__APPLE__)) 253 #elif defined (__GNUC__) && (defined (__linux__) || defined (__APPLE__)) 260 # error No/unknown platform thread support 324 #endif // GENAPI_GCSYNCH_H void Unlock()
leaves the critical section
Instance-Lock for an object.
virtual void operator=(bool Value)
Set node value.
CGlobalLockUnlocker(CGlobalLock &lock)
unlocks the global lock object on destruction
Lock(const LockableObject< Object > &obj)
void Lock()
enters the critical section (may block)
This class is for testing purposes only.
Lock GetLock() const
Get a new lock.
Named global lock which can be used over process boundaries.
A string class which is a clone of std::string.
void UnlockEarly(void)
This function allows to unlock the object early before the object is destroyed.
void Unlock(void)
leaves the lock
const LockableObject< Object > & m_Object
Reference to outer object.
Platform-dependent type definitions.