13#if defined(OS_USE_OS_APP_CONFIG_H)
14#include <cmsis-plus/os-app-config.h>
22#pragma clang diagnostic ignored "-Wc++98-compat"
264 const char* name,
const attributes& attr __attribute__((unused))) :
268#if defined(OS_TRACE_RTOS_CONDVAR)
269 trace::printf (
"%s() @%p %s\n", __func__,
this, this->name ());
296#if defined(OS_TRACE_RTOS_CONDVAR)
301 assert(list_.empty ());
341#if defined(OS_TRACE_RTOS_CONDVAR)
411#if defined(OS_TRACE_RTOS_CONDVAR)
511#if defined(OS_TRACE_RTOS_CONDVAR)
525 internal::waiting_thread_node node
531 res = mutex.unlock ();
541 node.thread_->waiting_node_ = &node;
547 node.thread_->waiting_node_ =
nullptr;
656#if defined(OS_TRACE_RTOS_CONDVAR)
658#pragma GCC diagnostic push
659#if defined(__clang__)
660#elif defined(__GNUC__)
661#pragma GCC diagnostic ignored "-Wuseless-cast"
664 static_cast<unsigned int> (timeout),
this,
name ());
665#pragma GCC diagnostic pop
679 internal::waiting_thread_node node
685 res = mutex.unlock ();
695 node.thread_->waiting_node_ = &node;
697 res = mutex.timed_lock (timeout);
701 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.