Files
RTOS/Kernel/SingleCore/os_condv.h
T
2026-05-19 11:49:22 +08:00

41 lines
969 B
C

#ifndef INCLUDED_OS_CONDV_H
#define INCLUDED_OS_CONDV_H
#ifndef INCLUDED_OS_TYPES_H
#include <os_types.h>
#endif /*INCLUDED_OS_TYPES_H*/
#ifndef INCLUDED_OS_MUTEX_H
#include <os_mutex.h>
#endif /*INCLUDED_OS_MUTEX_H*/
/* ------------------------------------------------------------------------------------------------------------------ */
/* */
typedef struct os_condv_t os_condv_t;
struct os_condv_t{
os_list_t wait_list;
};
void os_condv_init(os_condv_t* self);
void os_condv_destroy(os_condv_t* self);
void os_condv_wait(os_condv_t* self, os_mutex_t* lock);
os_err_t os_condv_timed_wait(os_condv_t* self, os_mutex_t* lock, os_tick_t ticks);
os_err_t os_condv_wait_until(os_condv_t* self, os_mutex_t* lock, os_tick_t ticks);
void os_condv_notify_one(os_condv_t* self);
void os_condv_notify_all(os_condv_t* self);
void os_condv_notify_one_in_isr(os_condv_t* self);
void os_condv_notify_all_in_isr(os_condv_t* self);
#endif /*INCLUDED_OS_CONDV_H*/