CooCox 1.1.4 on mbed with simple blinky example
event management implementation code of CooCox CoOS kernel. More...
Go to the source code of this file.
Functions | |
void | CreateEventList (void) |
Create a empty list of event control block. | |
static void | ReleaseECB (P_ECB pecb) |
Release a ECB. | |
P_ECB | CreatEvent (U8 eventType, U8 eventSortType, void *eventPtr) |
Create a event. | |
StatusType | DeleteEvent (P_ECB pecb, U8 opt) |
Delete a event. | |
void | EventTaskToWait (P_ECB pecb, P_OSTCB ptcb) |
Insert a task to event wait list. | |
void | EventTaskToRdy (P_ECB pecb) |
Move a task from event WAITING list to the DELAY list. | |
void | RemoveEventWaittingList (P_OSTCB ptcb) |
Move a task from event wait list to the ready list. | |
Variables | |
ECB | EventTbl [CFG_MAX_EVENT] = {{0}} |
P_ECB | FreeEventList = 0 |
Detailed Description
event management implementation code of CooCox CoOS kernel.
- Version:
- V1.1.4
- Date:
- 2011.04.20
INTERNAL FILE,DON'T PUBLIC.
© COPYRIGHT 2009 CooCox
Definition in file event.c.
Function Documentation
void CreateEventList | ( | void | ) |
P_ECB CreatEvent | ( | U8 | eventType, |
U8 | eventSortType, | ||
void * | eventPtr | ||
) |
Create a event.
- Parameters:
-
[in] eventType The type of event which being created. [in] eventSortType Event sort type. [in] eventCounter Event counter,ONLY for EVENT_TYPE_SEM. [in] eventPtr Event struct pointer,ONLY for Queue.Co_NULL for other event type. [out] None
- Return values:
-
Co_NULL Invalid pointer,create event fail. others Pointer to event control block which had assigned right now.
- Description
This function is called by CreateSem(),... to get a event control block and initial the event content.
- Note:
- This is a internal function of CooCox CoOS,User can't call.
StatusType DeleteEvent | ( | P_ECB | pecb, |
U8 | opt | ||
) |
Delete a event.
- Parameters:
-
[in] pecb Pointer to event control block which will be deleted. [in] opt Delete option. - == OPT_DEL_ANYWAY Delete event always
- == OPT_DEL_NO_PEND Delete event only when no task pending on.
[out] None
- Return values:
-
E_INVALID_PARAMETER Parameter passed is invalid,deleted fail. E_TASK_WAITTING These are one more tasks waitting event. E_OK Delete event control block successful.
- Description
This function is called to delete a event from the event wait list use specify option.
- Note:
- This is a internal function of Coocox CoOS,user can't call.
void EventTaskToRdy | ( | P_ECB | pecb ) |
Move a task from event WAITING list to the DELAY list.
- Parameters:
-
[in] pecb Pointer to event control block corresponding to the event. [out] None
- Return values:
-
None
- Description
This function is called to remove a task from event wait list,and then insert it into the READY list.
Insert a task to event wait list.
- Parameters:
-
[in] pecb Pointer to event control block corresponding to the event. [in] ptcb Pointer to task that will be insert to event wait list. [out] None
- Return values:
-
None
- Description
This function is called to insert a task by fllowing manner: opt == EVENT_SORT_TYPE_FIFO By FIFO. opt == EVENT_SORT_TYPE_PRIO By priority order,hghest priority as head,lowest priority as end. (Highest-->...-->Lowest-->Co_NULL)
static void ReleaseECB | ( | P_ECB | pecb ) | [static] |
void RemoveEventWaittingList | ( | P_OSTCB | ptcb ) |
Move a task from event wait list to the ready list.
- Parameters:
-
[in] pecb Pointer to event control block corresponding to the event. [out] None
- Return values:
-
None
- Description
This function is called to remove a task from event wait list,and then insert it to the ready list.
Variable Documentation
P_ECB FreeEventList = 0 |
Generated on Tue Jul 12 2022 18:19:10 by 1.7.2