Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
OsEvent.h File Reference
Event management header file. More...
Go to the source code of this file.
Data Structures | |
| struct | EventCtrBlk |
| Event control block. More... | |
Functions | |
| P_ECB | CreatEvent (U8 eventType, U8 eventSortType, void *eventPtr) |
| Create a event. | |
| void | EventTaskToWait (P_ECB pecb, P_OSTCB ptcb) |
| Insert a task to event wait list. | |
| StatusType | DeleteEvent (P_ECB pecb, U8 opt) |
| void | EventTaskToRdy (P_ECB pecb) |
| Move a task from event WAITING list to the DELAY list. | |
| void | CreateEventList (void) |
| Create a empty list of event control block. | |
| void | RemoveEventWaittingList (P_OSTCB ptcb) |
| Move a task from event wait list to the ready list. | |
Variables | |
| ECB | EventTbl [CFG_MAX_EVENT] |
Detailed Description
Event management header file.
- Version:
- V1.1.3
- Date:
- 2010.04.26
This file including some defines and declares related to event (semaphore,mailbox,queque) management.
INTERNAL FILE,DON'T PUBLIC.
© COPYRIGHT 2009 CooCox
Definition in file OsEvent.h.
Function Documentation
| void CreateEventList | ( | void | ) |
| P_ECB CreatEvent | ( | U8 | eventType, |
| U8 | eventSortType, | ||
| void * | eventPtr | ||
| ) |
Create a event.
< Create a event Remove a task from wait list
- 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.0 for other event type. [out] None
- Return values:
-
0 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.
Insert a task to 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 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-->0)
| 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
Generated on Tue Jul 12 2022 15:09:52 by
1.7.2