48typedef struct __que que_t;
69#define _QUE_INIT() { NULL }
75typedef struct __lst lst_t;
84typedef struct __lst lst_id [];
100#define _LST_INIT() { _OBJ_INIT(), _QUE_INIT() }
108#define OS_LST( lst ) \
109 lst_t lst[] = { _LST_INIT() }
112#define static_LST( lst ) \
113 static lst_t lst[] = { _LST_INIT() }
137#define LST_CREATE() \
249#if defined(__cplusplus)
260struct ListTT :
public __lst
264 ListTT(): __lst _LST_INIT() {}
266 ~ListTT() { assert(__lst::obj.queue ==
nullptr); }
271 assert(_src.obj.queue ==
nullptr && _src.head.next ==
nullptr);
280 int take ( C **_data ) {
return lst_take (
this,
reinterpret_cast<void **
>(_data)); }
281 int tryWait ( C **_data ) {
return lst_tryWait (
this,
reinterpret_cast<void **
>(_data)); }
286 int wait ( C **_data ) {
return lst_wait (
this,
reinterpret_cast<void **
>(_data)); }
#define INFINITE
infinite waiting
Definition osbase.h:250
void lst_init(lst_t *lst)
initialize a list object
void lst_reset(lst_t *lst)
wake up all waiting tasks with 'E_STOPPED' event value
int lst_waitUntil(lst_t *lst, void **data, cnt_t time)
try to get memory object from the list object, wait until given timepoint while the list object is em...
void lst_give(lst_t *lst, void *data)
transfer memory object to the list object,
int lst_take(lst_t *lst, void **data)
try to get memory object from the list object, don't wait if the list object is empty
int lst_wait(lst_t *lst, void **data)
try to get memory object from the list object, wait indefinitely while the list object is empty
Definition oslist.h:230
void lst_kill(lst_t *lst)
alias of lst_reset()
Definition oslist.h:167
int lst_waitFor(lst_t *lst, void **data, cnt_t delay)
try to get memory object from the list object, wait for given duration of time while the list object ...
int lst_tryWait(lst_t *lst, void **data)
alias of lst_take()
Definition oslist.h:184
char data[]
message data
Definition osmessagequeue.h:54
static constexpr rep until(const std::chrono::time_point< Clock, _Duration > &_time)
time point in ticks, rounded up to whole ticks (only a time point of this clock)
Definition osclock.h:109
static constexpr rep count(const std::chrono::duration< _Rep, _Period > &_delay)
delay in ticks, rounded up to whole ticks; negative delay: IMMEDIATE, delay out of range: INFINITE
Definition osclock.h:102
create and initialize a list object
Definition oslist.h:260
int waitFor(void **_data, const T &_delay)
Definition oslist.h:282
int waitUntil(void **_data, const T &_time)
Definition oslist.h:284
int wait(void **_data)
Definition oslist.h:285
int tryWait(C **_data)
lst_tryWait()
Definition oslist.h:280
void kill()
Definition oslist.h:278
int take(void **_data)
Definition oslist.h:279
constexpr ListTT()
constructor, see the constructor parameters of the class
Definition oslist.h:263
void give(void *_data)
lst_give()
Definition oslist.h:286
void reset()
Definition oslist.h:277