99 #ifndef _TN_EVENTGRP_H
100 #define _TN_EVENTGRP_H
368 #endif // _TN_EVENTGRP_H
A link to event group: used when event group can be connected to some kernel object, such as queue.
enum TN_RCode tn_eventgrp_wait(struct TN_EventGrp *eventgrp, TN_UWord wait_pattern, enum TN_EGrpWaitMode wait_mode, TN_UWord *p_flags_pattern, TN_Timeout timeout)
Wait for specified event(s) in the event group.
enum TN_RCode tn_eventgrp_iwait_polling(struct TN_EventGrp *eventgrp, TN_UWord wait_pattern, enum TN_EGrpWaitMode wait_mode, TN_UWord *p_flags_pattern)
The same as tn_eventgrp_wait() with zero timeout, but for using in the ISR.
Task waits for all of the event bits from the wait_pattern to be set in the event group...
enum TN_EGrpWaitMode wait_mode
event wait mode: AND or OR
Circular doubly linked list, for internal kernel usage.
TN_EGrpOp
Modify operation: set, clear or toggle.
Clear flags that are set in the given pattern argument.
TN_RCode
Result code returned by kernel services.
TN_ObjId
Magic number for object validity verification TODO: use TN_UWord here instead of unsigned int...
unsigned long TN_Timeout
The value representing maximum number of system ticks to wait.
EventGrp-specific fields related to waiting task, to be included in struct TN_Task.
TN_EGrpWaitMode
Events waiting mode: wait for all flags to be set or just for any of the specified flags to be set...
Definitions used through the whole kernel.
struct TN_EventGrp * eventgrp
event group whose event(s) should be managed by other kernel object
enum TN_RCode tn_eventgrp_imodify(struct TN_EventGrp *eventgrp, enum TN_EGrpOp operation, TN_UWord pattern)
The same as tn_eventgrp_modify(), but for using in the ISR.
Toggle flags that are set in the given pattern argument.
TN_UWord pattern
event pattern to manage
Task waits for any of the event bits from the wait_pattern to be set in the event group...
enum TN_ObjId id_event
id for object validity verification
enum TN_RCode tn_eventgrp_create(struct TN_EventGrp *eventgrp, TN_UWord initial_pattern)
Construct event group.
enum TN_RCode tn_eventgrp_modify(struct TN_EventGrp *eventgrp, enum TN_EGrpOp operation, TN_UWord pattern)
Modify current events bit pattern in the event group.
enum TN_RCode tn_eventgrp_delete(struct TN_EventGrp *eventgrp)
Destruct event group.
TN_UWord wait_pattern
event wait pattern
Kernel system routines: system start, tick processing, time slice managing.
Set flags that are set in given pattern argument.
TN_UWord actual_pattern
pattern that caused task to finish waiting
Circular doubly linked list item, for internal kernel usage.
unsigned int TN_UWord
Unsigned integer type whose size is equal to the size of CPU register.
TN_UWord pattern
current flags pattern
enum TN_RCode tn_eventgrp_wait_polling(struct TN_EventGrp *eventgrp, TN_UWord wait_pattern, enum TN_EGrpWaitMode wait_mode, TN_UWord *p_flags_pattern)
The same as tn_eventgrp_wait() with zero timeout.
struct TN_ListItem wait_queue
task wait queue