tk_sig_tev
Signal Task Event
ER ercd = tk_sig_tev ( ID tskid, INT tskevt ) ;
ID tskid Task ID
INT tskevt Task event number (1 to 8)
ER ercd Error code
E_OK Normal completion
E_ID Invalid ID number (tskid is invalid or cannot be used)
E_NOEXS Object does not exist (the task specified in tskid does not exist)
E_OBJ Invalid object state (called for a task in DORMANT state)
E_PAR Parameter error (tskevt is invalid)
Sends the task event specified in tskevt to the task specified in tskid. There are eight task event types
stored for each task, specified by numbers 1 to 8.
The task event send count is not saved, only whether the event occurs or not.
The invoking task can be specified by setting tskid = TSK_SELF = 0. Note, however, that when a
system call is issued from a task-independent portion and tskid = TSK_SELF = 0 is specified, error code E_ID is returned.
The task event function is used for synchronization much like tk_slp_tsk and tk_wup_tsk, but di.ers from the use of those system calls in the following ways.
- The wakeup request (task event) count is not kept.
- Wakeup requests can be classi.ed by the eight event types.
Using the same event type for synchronization in two or more places in the same task would cause confusion. Event type allocation should be clearly defined. The task event function is intended for use in middleware, and as a rule should not be used in ordinary applications. Use of tk_slp_tsk and tk_wup_tsk is recommended for applications.

Comments