26 #include <rtai_posix.h> 33 #undef STRICT_LXRT_CHECKS 42 #ifdef STRICT_LXRT_CHECKS 45 PRINTF(
"RWLockImplLxrt38::RWLockImplLxrt38: Called from a Linux task!\n");
49 m_rwlock = rt_typed_rwl_init(
size_t(
this), RESEM_RECURS);
54 #ifdef STRICT_LXRT_CHECKS 57 PRINTF(
"RWLockImplLxrt38::~RWLockImplLxrt38: Called from a Linux task!\n");
70 #ifdef STRICT_LXRT_CHECKS 73 PRINTF(
"RWLockImplLxrt38::readLock: Called from a Linux task!\n");
82 #ifdef STRICT_LXRT_CHECKS 85 PRINTF(
"RWLockImplLxrt38::readLock: Called from a Linux task!\n");
90 int ret = rt_rwl_rdlock_until(
m_rwlock, timespec2count(&timeout_spec));
96 #ifdef STRICT_LXRT_CHECKS 99 PRINTF(
"RWLockImplLxrt38::readLock: Called from a Linux task!\n");
108 #ifdef STRICT_LXRT_CHECKS 111 PRINTF(
"RWLockImplLxrt38::tryReadLock: Called from a Linux task!\n");
115 int ret = rt_rwl_rdlock_if(
m_rwlock);
121 #ifdef STRICT_LXRT_CHECKS 124 PRINTF(
"RWLockImplLxrt38::writeLock: Called from a Linux task!\n");
128 return rt_rwl_wrlock(
m_rwlock) == 0;
133 #ifdef STRICT_LXRT_CHECKS 136 PRINTF(
"RWLockImplLxrt38::writeLock: Called from a Linux task!\n");
141 int ret = rt_rwl_wrlock_until(
m_rwlock, timespec2count(&timeout_spec));
147 #ifdef STRICT_LXRT_CHECKS 150 PRINTF(
"RWLockImplLxrt38::writeLock: Called from a Linux task!\n");
159 #ifdef STRICT_LXRT_CHECKS 162 PRINTF(
"RWLockImplLxrt38::tryWriteLock: Called from a Linux task!\n");
166 int ret = rt_rwl_wrlock_if(
m_rwlock);
182 #ifdef STRICT_LXRT_CHECKS 185 PRINTF(
"RWLockImplLxrt38::unlock: Called from a Linux task!\n");
TimeStamp getAbsoluteTimeout(const TimeSpan &timeout_relative)
Represents absolute times.
virtual ~RWLockImplLxrt38()
Contains a system independet PRINTF macro.
virtual bool tryReadLock()
Contains icl_core::thread::tMutex.
const TimeSpan timeout(1, 0)
Contains global LXRT functions.
Repesents absolute times.
virtual bool tryWriteLock()
Contains icl_core::thread::RWLockImplLxrt38.
struct timespec systemTimespec() const