30 #undef STRICT_LXRT_CHECKS 39 #ifdef STRICT_LXRT_CHECKS 42 PRINTF(
"RWLockImplLxrt33::RWLockImplLxrt33: Called from a Linux task!\n");
47 pthread_rwlock_init_rt(
m_rwlock, NULL);
52 #ifdef STRICT_LXRT_CHECKS 55 PRINTF(
"RWLockImplLxrt33::~RWLockImplLxrt33: Called from a Linux task!\n");
69 #ifdef STRICT_LXRT_CHECKS 72 PRINTF(
"RWLockImplLxrt33::readLock: Called from a Linux task!\n");
76 return pthread_rwlock_rdlock_rt(
m_rwlock) == 0;
81 #ifdef STRICT_LXRT_CHECKS 84 PRINTF(
"RWLockImplLxrt33::readLock: Called from a Linux task!\n");
89 int ret = pthread_rwlock_timedrdlock_rt(
m_rwlock, &timeout_absolute_timespec);
95 #ifdef STRICT_LXRT_CHECKS 98 PRINTF(
"RWLockImplLxrt33::readLock: Called from a Linux task!\n");
107 #ifdef STRICT_LXRT_CHECKS 110 PRINTF(
"RWLockImplLxrt33::tryReadLock: Called from a Linux task!\n");
114 int ret = pthread_rwlock_tryrdlock_rt(
m_rwlock);
120 #ifdef STRICT_LXRT_CHECKS 123 PRINTF(
"RWLockImplLxrt33::writeLock: Called from a Linux task!\n");
127 return pthread_rwlock_wrlock_rt(
m_rwlock) == 0;
132 #ifdef STRICT_LXRT_CHECKS 135 PRINTF(
"RWLockImplLxrt33::writeLock: Called from a Linux task!\n");
140 int ret = pthread_rwlock_timedwrlock_rt(
m_rwlock, &timeout_absolute_timespec);
146 #ifdef STRICT_LXRT_CHECKS 149 PRINTF(
"RWLockImplLxrt33::writeLock: Called from a Linux task!\n");
158 #ifdef STRICT_LXRT_CHECKS 161 PRINTF(
"RWLockImplLxrt33::tryWriteLock: Called from a Linux task!\n");
172 return writeLock(try_write_lock_timeout);
177 #ifdef STRICT_LXRT_CHECKS 180 PRINTF(
"RWLockImplLxrt33::unlock: Called from a Linux task!\n");
TimeStamp getAbsoluteTimeout(const TimeSpan &timeout_relative)
pthread_rwlock_t * m_rwlock
Represents absolute times.
virtual bool tryReadLock()
Contains a system independet PRINTF macro.
Contains icl_core::thread::tMutex.
const TimeSpan timeout(1, 0)
Contains global LXRT functions.
Repesents absolute times.
Contains icl_core::thread::RWLockImplLxrt33.
virtual bool tryWriteLock()
struct timespec systemTimespec() const
virtual ~RWLockImplLxrt33()