33#pragma clang diagnostic ignored "-Wc++98-compat"
276 const char* name,
const attributes& attr __attribute__((unused))) :
280#if defined(OS_TRACE_RTOS_CONDVAR)
281 trace::printf (
"%s() @%p %s\n", __func__,
this, this->name ());
308#if defined(OS_TRACE_RTOS_CONDVAR)
313 assert(list_.empty ());
353#if defined(OS_TRACE_RTOS_CONDVAR)
423#if defined(OS_TRACE_RTOS_CONDVAR)
523#if defined(OS_TRACE_RTOS_CONDVAR)
537 internal::waiting_thread_node node
543 res = mutex.unlock ();
553 node.thread_->waiting_node_ = &node;
559 node.thread_->waiting_node_ =
nullptr;
668#if defined(OS_TRACE_RTOS_CONDVAR)
670 static_cast<unsigned int> (timeout),
this,
name ());
683 internal::waiting_thread_node node
689 res = mutex.unlock ();
699 node.thread_->waiting_node_ = &node;
701 res = mutex.timed_lock (timeout);
705 node.thread_->waiting_node_ =
nullptr;
Condition variable attributes.
POSIX compliant condition variable.
result_t signal(void)
Notify one thread waiting for a condition variable.
result_t broadcast(void)
Notify all threads waiting for a condition variable.
result_t wait(mutex &mutex)
Wait for a condition variable to be notified.
condition_variable(const attributes &attr=initializer)
Construct a condition variable object instance.
~condition_variable()
Destruct the condition variable object instance.
result_t timed_wait(mutex &mutex, clock::duration_t timeout)
Timed wait for a condition variable to be notified.
const char * name(void) const
Get object name.
int printf(const char *format,...)
Write a formatted string to the trace device.
port::clock::duration_t duration_t
Type of variables holding clock durations.
static const attributes initializer
Default condition variable initialiser.
bool in_handler_mode(void)
Check if the CPU is in handler mode.
@ ok
Function completed; no errors or events occurred.
bool locked(void)
Check if the scheduler is locked.
thread & thread(void)
Get the current running thread.
uint32_t result_t
Type of values returned by RTOS functions.
#define os_assert_throw(__e, __er)
Assert or throw a system error exception.
#define os_assert_err(__e, __er)
Assert or return an error.
Single file µOS++ RTOS definitions.