1. Task-related functions:
1. task scheduling function
Kerneltimeslice ()
Function: Enable cyclic scheduling.
Input parameters:
Return Value:
Library and header file:
Taskpriorityset ()
Function: Change the task priority.
Input parameters:
Return Value:
Library and header file:
Tasklock ()
Function: Disable task scheduling.
Input parameters:
Return Value:
Library and header file:
Taskunlock ()
Function: Enable task scheduling.
Input parameters:
Return Value:
Library and header file:
2. Task creation Function
Taskspawn ()
Function: Creates and activates a task.
Input parameters:
Return Value:
Library and header file:
Taskinit ()
Function: initialize a new task.
Input parameters:
Return Value:
Library and header file:
Taskactivate ()
Function: activate an initialized task.
Input parameters:
Return Value:
Library and header file:
3. Operate task Functions
Taskname ()
Function: gets the task name associated with the ID.
Input parameters:
Return Value:
Library and header file:
Tasknametoid ()
Function: Find the task id associated with the task name.
Input parameters:
Return Value:
Library and header file:
Taskidself ()
Function: gets the ID of the current task.
Input parameters:
Return Value:
Library and header file:
Taskidverify ()
Function: confirm the existence of the specified task.
Input parameters:
Return Value:
Library and header file:
Taskoptionsget ()
Function: gets the task option information.
Input parameters:
Return Value:
Library and header file:
Taskoptionsset ()
Function: sets the task options.
Input parameters:
Return Value:
Library and header file:
5. semaphore control functions
Sembcreat ()
Function: allocates space for Binary semaphores and initializes them.
Input parameters:
Return Value:
Library and header file:
Semmcreat ()
Function: allocates space for mutex semaphores and initializes them.
Input parameters:
Return Value:
Library and header file:
Semccreat ()
Function: allocates space for counting semaphores and initializes them.
Input parameters:
Return Value:
Library and header file:
Semdelete ()
Function: Terminate and release the specified semaphore.
Input parameters:
Return Value:
Library and header file:
Semtask ()
Function: gets the specified semaphore.
Input parameters:
Return Value:
Library and header file:
Semgive ()
Function: Specify the semaphore.
Input parameters:
Return Value:
Library and header file:
Semflush ()
Function: puts all tasks waiting for the specified semaphore in the ready state.
Input parameters:
Return Value:
Library and header file: