Task-Dependent Synchronization Functions
Task-dependent synchronization functions achieve synchronization among tasks by direct manipulation of task states. They include functions for task sleep and wakeup, for canceling wakeup requests, for forcibly releasing task WAIT state, for changing a task state to SUSPEND state, for delaying execution of the invoking task, and for disabling task WAIT state.
Wakeup requests for a task are queued. That is, when it is attempted to wake up a task that is not sleeping, the wakeup request is remembered, and the next time the task is to go to a sleep state (waiting for wakeup), it does not enter that state. Queuing of task wakeup requests is realized by having the task keep a task wakeup request queuing count. When the task is started, this count is cleared to 0.
Suspend requests for a task are nested. That is, if it is attempted to suspend a task already in SUSPEND state (including WAIT-SUSPEND state), the request is remembered and later when it is attempted to resume the task in SUSPEND state (including WAIT-SUSPEND state), it is not resumed. Nesting of suspend requests is realized by having the task keep a suspend request nesting count. When the task is started, this count is cleared to 0.
There are no system calls concerning the following task events and wait-disabled state:
tk_sig_tevsends a task eventtk_wai_tevwaits for a task eventtk_dis_waidisables task wait statetk_ena_waiclears task wait-disabled
For more information, see the following:

Comments
Click here to Post a Comment