| | LOS_Tick2MS | Converts ticks into milliseconds.|
</th>
| | OsCpuTick2MS | Converts cycles into milliseconds. Two UINT32 values indicate the high-order and low-order 32 bits of the result value, respectively.|
| | OsCpuTick2US | Converts cycles into microseconds. Two UINT32 values indicate the high-order and low-order 32 bits of the result value, respectively.|
</th>
| Time statistics| LOS_SysClockGet | Obtains the system clock.|
</tr>
| | LOS_TickCountGet | Obtains the number of ticks since the system starts.|
</thead>
| | LOS_CyclePerTickGet | Obtains the number of cycles for each tick.|
| | LOS_MDelay |Performs busy waiting in ms, which can be preempted by a task with a higher priority.|
</td>
<tdclass="cellrowborder"valign="top"width="58.44584458445845%"headers="mcps1.2.4.1.3 "><pid="p1717215119159"><aname="p1717215119159"></a><aname="p1717215119159"></a>Converts milliseconds into ticks.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p61721311101517"><aname="p61721311101517"></a><aname="p61721311101517"></a>Converts ticks into milliseconds.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p14367121422016"><aname="p14367121422016"></a><aname="p14367121422016"></a>Converts cycles into milliseconds. Two UINT32 values indicate the high-order and low-order 32 bits of the result value, respectively.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p26621730152310"><aname="p26621730152310"></a><aname="p26621730152310"></a>Converts cycles into microseconds. Two UINT32 values indicate the high-order and low-order 32 bits of the result value, respectively.</p>
<tdclass="cellrowborder"valign="top"width="58.44584458445845%"headers="mcps1.2.4.1.3 "><pid="p1827813571317"><aname="p1827813571317"></a><aname="p1827813571317"></a>Obtains the system clock.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p17278163512131"><aname="p17278163512131"></a><aname="p17278163512131"></a>Obtains the number of ticks since the system starts.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p827819358134"><aname="p827819358134"></a><aname="p827819358134"></a>Obtains the number of cycles for each tick.</p>
</td>
</tr>
</tbody>
</table>
## How to Develop<a name="section783435801510"></a>
## How to Develop<a name="section783435801510"></a>
...
@@ -95,7 +49,8 @@ The typical development process of time management is as follows:
...
@@ -95,7 +49,8 @@ The typical development process of time management is as follows:
1. Complete board configuration and adaptation as required, and configure the system clock frequency \(**OS\_SYS\_CLOCK** in Hz and **LOSCFG\_BASE\_CORE\_TICK\_PER\_SECOND**\). The default value of **OS\_SYS\_CLOCK** varies with the hardware platform.
1. Complete board configuration and adaptation as required, and configure the system clock frequency \(**OS\_SYS\_CLOCK** in Hz and **LOSCFG\_BASE\_CORE\_TICK\_PER\_SECOND**\). The default value of **OS\_SYS\_CLOCK** varies with the hardware platform.
>- The time management module depends on **OS\_SYS\_CLOCK** and **LOSCFG\_BASE\_CORE\_TICK\_PER\_SECOND**.
>- The time management module depends on **OS\_SYS\_CLOCK** and **LOSCFG\_BASE\_CORE\_TICK\_PER\_SECOND**.
>- The number of system ticks is not counted when the interrupt feature is disabled. Therefore, the number of ticks cannot be used as the accurate time.
>- The number of system ticks is not counted when the interrupt feature is disabled. Therefore, the number of ticks cannot be used as the accurate time.
>- The configuration options are maintained in the **target\_config.h** file of the development board project.
>- The configuration options are maintained in the **target\_config.h** file of the development board project.
...
@@ -106,8 +61,8 @@ The typical development process of time management is as follows:
...
@@ -106,8 +61,8 @@ The typical development process of time management is as follows:
The following example describes basic time management methods, including:
The following example describes basic time management methods, including:
1. Time conversion: convert milliseconds to ticks or convert ticks to milliseconds.
- Time conversion: convert milliseconds to ticks or convert ticks to milliseconds.
2. Time statistics: obtain the number of cycles per tick, number of ticks since system startup, and number of delayed ticks.
- Time statistics: obtain the number of cycles per tick, number of ticks since system startup, and number of delayed ticks.
| | osKernelGetSysTimerFreq | Obtains the RTOS kernel system timer frequency.|
</th>
| | osKernelInitialize | Initializes the RTOS kernel.|
</tr>
| | osKernelLock | Locks the RTOS kernel scheduler.|
</thead>
| | osKernelUnlock | Unlocks the RTOS kernel scheduler.|
<tbody><trid="row159539510586"><tdclass="cellrowborder"rowspan="13"valign="top"width="18%"headers="mcps1.2.4.1.1 "><pid="p1194410585810"><aname="p1194410585810"></a><aname="p1194410585810"></a>Kernel information and control</p>
| | osKernelRestoreLock | Restores the RTOS kernel scheduler to the locked state.|
| | osThreadEnumerate | Enumerates active threads (not been implemented yet).|
</td>
| | osThreadExit | Terminates a running thread.|
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p12388182124219"><aname="p12388182124219"></a><aname="p12388182124219"></a>Obtains the current RTOS kernel status.</p>
| | osThreadGetCount | Obtains the number of active threads.|
</td>
| | osThreadGetId | Obtains the ID of the running thread.|
| | osThreadGetPriority | Obtains the current thread priority.|
</td>
| | osThreadGetStackSize | Obtains the thread stack size.|
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p17587193274218"><aname="p17587193274218"></a><aname="p17587193274218"></a>Obtains the RTOS kernel system timer count.</p>
| | osThreadGetStackSpace | Obtains the available stack space for a thread based on the stack waterline record during execution.|
</td>
| | osThreadGetState | Obtains the current thread status.|
</tr>
| | osThreadJoin | Waits for the specified thread to terminate.|
| | osThreadNew | Creates a thread and adds it to active threads.|
</td>
| | osThreadResume | Resumes the execution of a thread.|
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p1037932924610"><aname="p1037932924610"></a><aname="p1037932924610"></a>Obtains the RTOS kernel system timer frequency.</p>
| | osThreadSetPriority | Changes the priority of a thread.|
| | osThreadYield | Passes control to the next thread in the ready state.|
</td>
| Thread flag| osThreadFlagsSet | Sets flags for a thread.|
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p374817118497"><aname="p374817118497"></a><aname="p374817118497"></a>Initializes the RTOS kernel.</p>
| | osThreadFlagsClear | Clears the specified flags for the running thread.|
</td>
| | osThreadFlagsGet | Obtains the current flags of the running thread.|
</tr>
| | osThreadFlagsWait | Waits for one or more thread flags of the running thread to signal.|
| | osTimerGetName | Obtains the timer name (not implemented yet).|
</td>
| | osTimerIsRunning | Checks whether a timer is running.|
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p148385316469"><aname="p148385316469"></a><aname="p148385316469"></a>Restores the RTOS kernel scheduler to the locked state.</p>
| | osTimerNew | Creates and initializes a timer.|
| | osMessageQueueGetSpace | Obtains the number of slots available for messages in the message queue.|
</td>
| | osMessageQueueNew | Creates and initializes a message queue.|
<tdclass="cellrowborder"valign="top"width="57.99999999999999%"headers="mcps1.2.4.1.3 "><pid="p1194415518581"><aname="p1194415518581"></a><aname="p1194415518581"></a>Detaches a thread (thread storage can be reclaimed when the thread terminates). (not implemented yet)</p>
| | osMessageQueuePut | Puts the message into the queue or times out if the queue is full.|
</td>
| | osMessageQueueReset | Initialized the message queue to the empty state (not implemented yet).|
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p368152110308"><aname="p368152110308"></a><aname="p368152110308"></a>Terminates execution of the thread that is currently running.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p587222622618"><aname="p587222622618"></a><aname="p587222622618"></a>Obtains the number of active threads.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p34317320269"><aname="p34317320269"></a><aname="p34317320269"></a>Returns the ID of the thread that is running.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p730821816303"><aname="p730821816303"></a><aname="p730821816303"></a>Obtains the name of a thread.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p1075615160301"><aname="p1075615160301"></a><aname="p1075615160301"></a>Obtains the current priority of a thread.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p1162744718265"><aname="p1162744718265"></a><aname="p1162744718265"></a>Obtains the stack size of a thread.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p16271047172619"><aname="p16271047172619"></a><aname="p16271047172619"></a>Obtains the available stack space of a thread based on the stack waterline record during execution.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p25722137304"><aname="p25722137304"></a><aname="p25722137304"></a>Obtains the current status of a thread.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p351555382611"><aname="p351555382611"></a><aname="p351555382611"></a>Waits for the specified thread to terminate. (not implemented yet)</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p135151053142614"><aname="p135151053142614"></a><aname="p135151053142614"></a>Creates a thread and add it to active threads.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p423671023016"><aname="p423671023016"></a><aname="p423671023016"></a>Resumes the execution of a thread.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p151515318261"><aname="p151515318261"></a><aname="p151515318261"></a>Changes the priority of a thread.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p20829179301"><aname="p20829179301"></a><aname="p20829179301"></a>Suspends the execution of a thread.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p95162537265"><aname="p95162537265"></a><aname="p95162537265"></a>Terminates the execution of a thread.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p65161534266"><aname="p65161534266"></a><aname="p65161534266"></a>Passes control to the next thread in the ready state.</p>
<tdclass="cellrowborder"valign="top"width="57.99999999999999%"headers="mcps1.2.4.1.3 "><pid="p6407151912451"><aname="p6407151912451"></a><aname="p6407151912451"></a>Sets the specified thread flags for a thread. (not implemented yet)</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p195951854124518"><aname="p195951854124518"></a><aname="p195951854124518"></a>Clears the specified thread flags of the thread that is running. (not implemented yet)</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p161121934163213"><aname="p161121934163213"></a><aname="p161121934163213"></a>Obtains the current thread flags of the thread that is running. (not implemented yet)</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p3251134423219"><aname="p3251134423219"></a><aname="p3251134423219"></a>Waits for one or more thread flags of the currently running thread to emit a signal. (not implemented yet)</p>
<tdclass="cellrowborder"valign="top"width="57.99999999999999%"headers="mcps1.2.4.1.3 "><pid="p162511844123210"><aname="p162511844123210"></a><aname="p162511844123210"></a>Obtains the name of an event flag object. (not implemented yet)</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p19620209133718"><aname="p19620209133718"></a><aname="p19620209133718"></a>Creates and initializes an event flag object.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p85761048153213"><aname="p85761048153213"></a><aname="p85761048153213"></a>Deletes an event flag object.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p1877255143717"><aname="p1877255143717"></a><aname="p1877255143717"></a>Obtains the current event flag.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p225211443712"><aname="p225211443712"></a><aname="p225211443712"></a>Waits for one or more event flags to be signaled.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p944155663213"><aname="p944155663213"></a><aname="p944155663213"></a>Waits until the specified time.</p>
<tdclass="cellrowborder"valign="top"width="57.99999999999999%"headers="mcps1.2.4.1.3 "><pid="p4460617134012"><aname="p4460617134012"></a><aname="p4460617134012"></a>Deletes a timer.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p111091116104011"><aname="p111091116104011"></a><aname="p111091116104011"></a>Obtains the name of a timer. (not implemented yet)</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p15171191510401"><aname="p15171191510401"></a><aname="p15171191510401"></a>Checks whether a timer is running.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p7307131416401"><aname="p7307131416401"></a><aname="p7307131416401"></a>Creates and initializes a timer.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p8300131334014"><aname="p8300131334014"></a><aname="p8300131334014"></a>Starts or restarts a timer.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p164211111114012"><aname="p164211111114012"></a><aname="p164211111114012"></a>Stops a timer.</p>
<tdclass="cellrowborder"valign="top"width="57.99999999999999%"headers="mcps1.2.4.1.3 "><pid="p17748110103311"><aname="p17748110103311"></a><aname="p17748110103311"></a>Acquires a mutex or waits for timeout (if locked).</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p1574811013313"><aname="p1574811013313"></a><aname="p1574811013313"></a>Deletes a mutex object.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p1672310911423"><aname="p1672310911423"></a><aname="p1672310911423"></a>Obtains the name of a mutex object. (not implemented yet)</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p1774880123313"><aname="p1774880123313"></a><aname="p1774880123313"></a>Obtains the thread that has a mutex object.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p16203147194210"><aname="p16203147194210"></a><aname="p16203147194210"></a>Creates and initializes a mutex object.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p138197519427"><aname="p138197519427"></a><aname="p138197519427"></a>Releases the mutex obtained by calling <strongid="b21561427141316"><aname="b21561427141316"></a><aname="b21561427141316"></a>osMutexAcquire</strong>.</p>
<tdclass="cellrowborder"valign="top"width="57.99999999999999%"headers="mcps1.2.4.1.3 "><pid="p15474643164212"><aname="p15474643164212"></a><aname="p15474643164212"></a>Obtains a semaphore token or waits for timeout if no token is available.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p15749005333"><aname="p15749005333"></a><aname="p15749005333"></a>Deletes a semaphore object.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p17836151144310"><aname="p17836151144310"></a><aname="p17836151144310"></a>Obtains the number of tokens of the current semaphore.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p19131519124316"><aname="p19131519124316"></a><aname="p19131519124316"></a>Obtains the name of a semaphore object. (not implemented yet)</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p174920133315"><aname="p174920133315"></a><aname="p174920133315"></a>Creates and initializes a semaphore object.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p1829193118439"><aname="p1829193118439"></a><aname="p1829193118439"></a>Releases a semaphore token till the initial maximum count.</p>
<tdclass="cellrowborder"valign="top"width="57.99999999999999%"headers="mcps1.2.4.1.3 "><pid="p17749808337"><aname="p17749808337"></a><aname="p17749808337"></a>Allocates a memory block from the memory pool.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p630111101441"><aname="p630111101441"></a><aname="p630111101441"></a>Deletes a memory pool object.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p1362961674412"><aname="p1362961674412"></a><aname="p1362961674412"></a>Releases the allocated memory block to the memory pool.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p9868112814414"><aname="p9868112814414"></a><aname="p9868112814414"></a>Obtains the memory block size in the memory pool.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p19372103510449"><aname="p19372103510449"></a><aname="p19372103510449"></a>Obtains the maximum number of memory blocks in the memory pool.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p22125715338"><aname="p22125715338"></a><aname="p22125715338"></a>Obtains the number of memory blocks used in the memory pool.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p10212675330"><aname="p10212675330"></a><aname="p10212675330"></a>Obtains the name of a memory pool object.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p1746455417441"><aname="p1746455417441"></a><aname="p1746455417441"></a>Obtains the number of available memory blocks in the memory pool.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p1750070144516"><aname="p1750070144516"></a><aname="p1750070144516"></a>Creates and initializes a memory pool object.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p17413163634510"><aname="p17413163634510"></a><aname="p17413163634510"></a>Obtains a message from the queue or waits for timeout if the queue is empty.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p162138719332"><aname="p162138719332"></a><aname="p162138719332"></a>Obtains the maximum number of messages in a message queue.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p174145104512"><aname="p174145104512"></a><aname="p174145104512"></a>Obtains the number of queued messages in a message queue.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p16243135844517"><aname="p16243135844517"></a><aname="p16243135844517"></a>Obtains the maximum size of the message in the memory pool.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p1590864164616"><aname="p1590864164616"></a><aname="p1590864164616"></a>Obtains the name of a message queue object. (not implemented yet)</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p165021611144610"><aname="p165021611144610"></a><aname="p165021611144610"></a>Obtains the number of available slots for messages in a message queue.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p9340131915465"><aname="p9340131915465"></a><aname="p9340131915465"></a>Creates and initializes a message queue object.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p114312720466"><aname="p114312720466"></a><aname="p114312720466"></a>Puts the message into the queue or waits till timeout if the queue is full.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p12214276338"><aname="p12214276338"></a><aname="p12214276338"></a>Resets the message queue to its initial empty state. (not implemented yet)</p>
</td>
</tr>
</tbody>
</table>
### How to Develop<a name="section48301225131720"></a>
### How to Develop<a name="section48301225131720"></a>
| | #include <pthread.h> | int pthread_cond_init(pthread_cond_t *restrict cond, const pthread_condattr_t *restrict attr); | Initializes a condition variable.|
</th>
| | #include <pthread.h> | int pthread_condattr_getpshared(const pthread_condattr_t *attr, int *shared); | Obtains condition variable attributes. Currently, only the attributes of **PTHREAD_PROCESS_PRIVATE** can be obtained.|
| | #include <pthread.h> | int pthread_condattr_setpshared(pthread_condattr_t *attr, int shared); | Sets a condition variable attribute.|
</th>
| | #include <pthread.h> | int pthread_condattr_getclock(const pthread_condattr_t *attr, clockid_t *clock); | Obtains the thread clock.|
</tr>
| | #include <pthread.h> | int pthread_condattr_destroy(pthread_condattr_t *attr); | Destroys a condition variable and invalidates the attribute object.|
</thead>
| | #include <pthread.h> | int pthread_cond_timedwait(pthread_cond_t *restrict cond, pthread_mutex_t *restrict mutex, const struct timespec *restrict abstime); | Waits for the condition.|
| | #include <pthread.h> | pthread_t pthread_self(void); | Obtains the ID of the current thread.|
</td>
| | #include <pthread.h> | int pthread_getschedparam(pthread_t thread, int *policy, struct sched_param *param); | Obtains the scheduling policy and parameters of a thread.|
<tdclass="cellrowborder"valign="top"width="23.46%"headers="mcps1.2.5.1.4 "><pid="p1795410468811"><aname="p1795410468811"></a><aname="p1795410468811"></a>Terminates the execution of a thread.</p>
| | #include <pthread.h> | int pthread_setschedparam(pthread_t thread, int policy, const struct sched_param *param); | Sets a scheduling policy and parameters for a thread.|
</td>
| | #include <pthread.h> | int pthread_setschedprio(pthread_t thread, int prio); | Sets the thread priority.|
| | #include <pthread.h> | int pthread_cancel(pthread_t thread); | Cancels a thread. Currently, a thread can be cancelled only by setting the **PTHREAD_CANCEL_ASYNCHRONOUS** status and then calling **pthread_cancel**.|
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p14560162914424"><aname="p14560162914424"></a><aname="p14560162914424"></a>Terminates the thread if the assertion is false.</p>
| | #include <pthread.h> | int pthread_equal(pthread_t thread1, pthread_t thread2); | Checks whether the two thread IDs are equal.|
</td>
| | #include <pthread.h> | int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *outType); | Obtains the mutex type attribute.|
</tr>
| | #include <pthread.h> | int pthread_mutex_init(pthread_mutex_t *__restrict m, const pthread_mutexattr_t *__restrict a); | Initializes a mutex.|
| | #include <pthread.h> | int pthread_mutex_lock(pthread_mutex_t *m); | Locks a mutex.|
</td>
| | #include <pthread.h> | int pthread_mutex_timedlock(pthread_mutex_t *mutex, const struct timespec *absTimeout); | Requests a mutex (blocked only within the specified period).|
| | #include <pthread.h> | int pthread_mutex_trylock(pthread_mutex_t *m); | Attempts to lock a mutex.|
</td>
| | #include <pthread.h> | int pthread_mutex_destroy(pthread_mutex_t *m); | Destroys a mutex.|
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p161321721154314"><aname="p161321721154314"></a><aname="p161321721154314"></a>Destroys a condition variable.</p>
| | #include <pthread.h> | int pthread_attr_init(pthread_attr_t *attr); | Initializes a thread attribute object.|
</td>
| | #include <pthread.h> | int pthread_attr_destroy(pthread_attr_t *attr); | Destroys a thread attribute object.|
</tr>
| | #include <pthread.h> | int pthread_attr_getstacksize(const pthread_attr_t *attr, size_t *stacksize); | Obtains the stack size of a thread attribute object.|
| | #include <pthread.h> | int pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize); | Sets the stack size for a thread attribute object.|
</td>
| | #include <pthread.h> | int pthread_attr_setstack(pthread_attr_t *attr, void *stackAddr, size_t stackSize); | Sets the stack attribute for a thread attribute object (not implemented yet).|
| | #include <pthread.h> | int pthread_attr_getstack(const pthread_attr_t *attr, void **stackAddr, size_t *stackSize); | Obtains the stack of a thread attribute object (not implemented yet).|
</td>
| | #include <pthread.h> | int pthread_attr_getschedparam(const pthread_attr_t *attr, struct sched_param *param); | Obtains scheduling parameter attributes of a thread attribute object.|
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p513392104319"><aname="p513392104319"></a><aname="p513392104319"></a>Initializes a condition variable.</p>
| | #include <pthread.h> | int pthread_attr_setschedparam(pthread_attr_t *attr, const struct sched_param *param); | Sets scheduling parameter attributes for a thread attribute object.|
</td>
| | #include <pthread.h> | int pthread_getname_np(pthread_t pthread, char *name, size_t len); | Obtains the thread name.|
</tr>
| | #include <pthread.h> | int pthread_setname_np(pthread_t pthread, const char *name); | Sets the thread name.|
| | #include <pthread.h> | int pthread_cond_broadcast(pthread_cond_t *c); | Unblocks all threads that are currently blocked on the condition variable **cond**.|
</td>
| | #include <pthread.h> | int pthread_cond_signal(pthread_cond_t *c); | Unblocks a thread.|
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p14142102984312"><aname="p14142102984312"></a><aname="p14142102984312"></a>Waits for the condition.</p>
| | #include <sys/stat.h> | int mkdir(const char *pathname, mode_t mode); | Creates a directory.|
</td>
| | #include <unistd.h> | int rmdir(const char *path); | Deletes a directory.|
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p465922994813"><aname="p465922994813"></a><aname="p465922994813"></a>Unlocks a mutex.</p>
| | #include <sys/stat.h> | int fstat(int fd, struct stat *buf); | Obtains file status.|
</td>
| | #include <sys/statfs.h> | int statfs(const char *path, struct statfs *buf); | Obtains the file system information for a file in a specified path.|
</tr>
| time | #include <sys/time.h> | int gettimeofday(struct timeval *tv, struct timezone *tz); | Obtains the time. Currently, time zone is not supported, and the return value of **tz** is empty.|
| | #include <time.h> | struct tm *localtime_r(const time_t *timep, struct tm *result); | Obtains the local time.|
</td>
| | #include <time.h> | time_t mktime(struct tm *tm); | Converts the date and time to broken-down time or ASCII.|
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p13678824091"><aname="p13678824091"></a><aname="p13678824091"></a>Creates a thread.</p>
| | #include <time.h> | size_t strftime(char *s, size_t max, const char *format,const struct tm *tm); | Formats the date and time.|
| | #include <time.h> | int nanosleep(const struct timespec *tspec1, struct timespec *tspec2); | Suspends the current thread till the specified time.|
</td>
| | #include <time.h> | int clock_gettime(clockid_t id, struct timespec *tspec); | Obtains the clock time.|
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p136799249910"><aname="p136799249910"></a><aname="p136799249910"></a>Waits for a thread to terminate.</p>
| | #include <time.h> | int timer_create(clockid_t id, struct sigevent *__restrict evp, timer_t *__restrict t); | Creates a timer for a thread.|
</td>
| | #include <time.h> | int timer_delete(timer_t t); | Deletes the timer for a thread.|
</tr>
| | #include <time.h> | int timer_settime(timer_t t, int flags, const struct itimerspec *__restrict val, struct itimerspec *__restrict old); | Sets a timer for a thread.|
| util | #include <stdlib.h> | int atoi(const char *nptr); | Converts the string pointed to by **nptr** into an integer (**int** type).|
</td>
| | #include <stdlib.h> | long atol(const char *nptr); | Converts the string pointed to by **nptr** into a long Integer (**long** type).|
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p196794241196"><aname="p196794241196"></a><aname="p196794241196"></a>Obtains the ID of the current thread.</p>
| | #include <stdlib.h> | long long atoll(const char *nptr); | Converts the string pointed to by **nptr** into a long long Integer (**long long** type).|
</td>
| | #include <ctype.h> | int isalnum(int c); | Checks whether the passed character is alphanumeric.|
</tr>
| | #include <ctype.h> | int isascii(int c); | Checks whether the passed character is an ASCII character.|
| | #include <ctype.h> | int isdigit(int c); | Checks whether the passed character is a digit.|
</td>
| | #include <ctype.h> | int islower(int c); | Checks whether the passed character is in lowercase.|
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.2 "><pid="p134701550192014"><aname="p134701550192014"></a><aname="p134701550192014"></a>int pthread_getschedparam(pthread_t thread, int *policy, struct sched_param *param);</p>
| | #include <ctype.h> | int isprint(int c); | Checks whether the passed character is printable, including spaces.|
</td>
| | #include <ctype.h> | int isspace(int c); | Checks whether the passed character is a white-space character.|
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p1567914241698"><aname="p1567914241698"></a><aname="p1567914241698"></a>Obtains the scheduling policy and parameters of a thread.</p>
| | #include <ctype.h> | int isupper(int c); | Checks whether the passed character is in uppercase.|
</td>
| | #include <ctype.h> | int isxdigit(int c); | Checks whether the passed character is a hexadecimal number.|
</tr>
| | #include <stdlib.h> | long int random (void); | Generates a pseudo-random number.|
| | #include <stdlib.h> | void srandom(unsigned int seed); | Initializes the random number generator.|
</td>
| | #include <ctype.h> | int tolower(int c); | Converts the given letter to lowercase.|
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.2 "><pid="p767922414914"><aname="p767922414914"></a><aname="p767922414914"></a>int pthread_setschedparam(pthread_t thread, int policy, const struct sched_param *param);</p>
| | #include <ctype.h> | int toupper(int c); | Converts the given letter to uppercase.|
</td>
| | #include <stdarg.h> | type va_arg(va_list ap, type); | Retrieves the next argument in the parameter list with **type**. |
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p1980015172155"><aname="p1980015172155"></a><aname="p1980015172155"></a>Sets a scheduling policy and parameters for a thread.</p>
| | #include <string.h> | char *strchr(const char *s, int c); | Searches for the first occurrence of a character in a string.|
</td>
| | #include <string.h> | int strcmp(const char *s1, const char *s2); | Compares two strings.|
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.2 "><pid="p1319921111419"><aname="p1319921111419"></a><aname="p1319921111419"></a>int pthread_mutex_init(pthread_mutex_t *__restrict m, const pthread_mutexattr_t *__restrict a);</p>
| | #include <string.h> | size_t strcspn(const char *s, const char *reject); | Obtains the length of the initial segment of the string **s** which does not contain any of bytes in the string **reject**.|
</td>
| | #include <string.h> | char *strdup(const char *s); | Copies a string to a new position.|
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p1199313147"><aname="p1199313147"></a><aname="p1199313147"></a>Initializes a mutex.</p>
| | #include <string.h> | size_t strlen(const char *s); | Obtains the length of a string.|
</td>
| | #include <strings.h> | int strncasecmp(const char *s1, const char *s2, size_t n); | Compares the bytes of the specified length in two strings, ignoring case.|
</tr>
| | #include <strings.h> | int strcasecmp(const char *s1, const char *s2); | Compares two strings, ignoring case.|
| | #include <string.h> | char *strstr(const char *haystack, const char *needle); | Searches for the specified substring in a string.|
</td>
| | #include <stdlib.h> | long int strtol(const char *nptr, char **endptr, int base); | Converts the string pointed to by **nptr** into a **long int** value according to the given **base**.|
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p111991415144"><aname="p111991415144"></a><aname="p111991415144"></a>Locks a mutex.</p>
| | #include <stdlib.h> | unsigned long int strtoul(const char *nptr, char **endptr, int base); | Converts the string pointed to by **nptr** into an unsigned **long int** value according to the given **base**.|
</td>
| | #include <stdlib.h> | unsigned long long int strtoull(const char *nptr, char **endptr,int base); | Converts the string pointed to by **nptr** into an unsigned **long long int** value according to the given **base**.|
</tr>
| | #include <regex.h> | int regcomp(regex_t *preg, const char *regex, int cflags); | Compiles a regular expression.|
| | #include <string.h> | char *strerror(int errnum); | Obtains an error message string of the specified error code.|
</td>
| math | #include <stdlib.h> | int abs(int i); | Obtains the absolute value.|
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p1920021121417"><aname="p1920021121417"></a><aname="p1920021121417"></a>Attempts to lock a mutex.</p>
| | #include <math.h> | double log(double x); | Obtains the natural logarithm (base-e logarithm) of **x**.|
</td>
| | #include <math.h> | double pow(double x, double y); | Obtains **x** raised to the power of **y**.|
</tr>
| | #include <math.h> | double round(double x); | Rounds off the value from zero to the nearest integer.|
| | #include <stdio.h> | int fclose(FILE *stream); | Closes a file stream.|
</td>
| | #include <stdio.h> | FILE *fdopen(int fd, const char *mode); | Opens a file stream based on the file descriptor.|
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p720013117146"><aname="p720013117146"></a><aname="p720013117146"></a>Destroys a mutex.</p>
| | #include <stdio.h> | int feof(FILE *stream); | Checks the end-of-file indicator for a stream.|
</td>
| | #include <stdio.h> | int fflush(FILE *stream); | Flushes a stream.|
</tr>
| | #include <stdio.h> | char *fgets(char *s, int size, FILE *stream); | Reads the next line of a stream.|
| | #include <unistd.h> | ssize_t write(int fd, const void *buf, size_t size); | Writes data a file.|
</td>
| | #include <unistd.h> | ssize_t read(int fd, void *buf, size_t size); | Reads data from a file.|
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p72003112144"><aname="p72003112144"></a><aname="p72003112144"></a>Destroys a thread attribute object.</p>
| net | #include <sys/socket.h> | void freeaddrinfo(struct addrinfo *res); | Releases the dynamic memory allocated using **getaddrinfo**.|
</td>
| | #include <sys/socket.h> | int getaddrinfo(const char *restrict nodename,const char *restrict servname,const struct addrinfo *restrict hints,struct addrinfo **restrict res); | Obtains a list of IP addresses and port numbers for the specified host and service.|
</tr>
| | #include <sys/socket.h> | int getnameinfo(const struct sockaddr *restrict sa, socklen_t salen,char *restrict node, socklen_t nodelen, char *restrict service,socklen_t servicelen, int flags); | Converts a **socketaddr** structure to a pair of host name and service strings.|
| | #include <arpa/inet.h> | char *inet_ntoa(struct in_addr in); | Converts the network host address in binary format to dotted decimal notation.|
</td>
| | #include <arpa/inet.h> | const char *inet_ntop(int af, const void *src,char *dst, socklen_t size); | Converts the network address in binary format to text.|
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p1620019116144"><aname="p1620019116144"></a><aname="p1620019116144"></a>Obtains the stack size of a thread attribute object.</p>
| | #include <arpa/inet.h> | int inet_pton(int af, const char *src, void *dst); | Converts the network address in standard text format to numeric binary format.|
</td>
| | #include <sys/socket.h> | int listen(int sockfd, int backlog); | Listens for connections on a socket.|
</tr>
| | #include <sys/socket.h> | ssize_t recvmsg(int sockfd, struct msghdr *msg, int flags); | Receives a message from a socket. Currently, only the scenario with **iov** of **1** is supported and ancillary messages are not supported.|
| | #include <sys/socket.h> | ssize_t send(int sockfd, const void *buf, size_t len, int flags); | Sends a message on a socket.|
</td>
| | #include <sys/socket.h> | ssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags); | Sends a message on a socket. Ancillary messages are not supported.|
| | #include <sys/socket.h> | ssize_t sendto(int sockfd, const void *buf, size_t len, int flags,const struct sockaddr *dest_addr, socklen_t addrlen); | Sends a message on a socket.|
</td>
| | #include <sys/socket.h> | int setsockopt(int sockfd, int level, int optname,const void *optval, socklen_t optlen); | Sets options associated with a socket.|
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p44515367157"><aname="p44515367157"></a><aname="p44515367157"></a>Sets the stack size for a thread attribute object.</p>
| mem | #include <string.h> | int memcmp(const void *s1, const void *s2, size_t n); | Compares successive elements from two arrays until it finds elements that are different.|
</td>
| | #include <string.h> | void *memcpy(void *dest, const void *src, size_t n); | Copies *n* bytes from the source memory area pointed to by **src** to the destination memory area pointed to by **dest**.|
| | #include <stdlib.h> | void free(void *ptr); | Release the memory space pointed to by **ptr**.|
</td>
| IPC | #include <semaphore.h> | int sem_timedwait(sem_t *sem, const struct timespec *abs_timeout); | Locks the semaphore referenced by **sem** as in the **sem_wait()** function.|
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p54633611154"><aname="p54633611154"></a><aname="p54633611154"></a>Obtains scheduling parameter attributes of a thread attribute object.</p>
| | #include <semaphore.h> | int sem_destroy(sem_t *sem); | Destroys the specified unnamed semaphore.|
</td>
| | #include <semaphore.h> | int sem_trywait(sem_t *sem); | Attempts to apply for a semaphore.|
</tr>
| | #include <semaphore.h> | int sem_init(sem_t *sem, int pshared, unsigned int value); | Creates and initializes an unnamed semaphore.|
| | #include <mqueue.h> | mqd_t mq_open(const char *mqName, int openFlag, ...); | Opens an existing message queue with the specified name or creates a message queue.|
</td>
| | #include <mqueue.h> | int mq_close(mqd_t personal); | Closes a message queue with the specified descriptor.|
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p1746636141515"><aname="p1746636141515"></a><aname="p1746636141515"></a>Sets scheduling parameter attributes for a thread attribute object.</p>
| | #include <mqueue.h> | int mq_unlink(const char *mqName); | Deletes the message queue of the specified name.|
</td>
| | #include <mqueue.h> | int mq_send(mqd_t personal, const char *msg, size_t msgLen, unsigned int msgPrio); | Puts a message with the specified content and length into a message queue.|
</tr>
| | #include <mqueue.h> | ssize_t mq_receive(mqd_t personal, char *msg, size_t msgLen, unsigned int *msgPrio); | Deletes the oldest message from a message queue and puts it in the buffer pointed to by **msg_ptr**.|
| | #include <mqueue.h> | int mq_timedsend(mqd_t personal, const char *msg, size_t msgLen, unsigned int msgPrio, const struct timespec *absTimeout) | Puts a message with the specified content and length into a message queue at the specified time.|
</td>
| | #include <mqueue.h> | ssize_t mq_timedreceive(mqd_t personal, char *msg, size_t msgLen, unsigned int *msgPrio, const struct timespec *absTimeout); | Obtains a message with the specified content and length from a message queue.|
| | #include <mqueue.h> | int mq_setattr(mqd_t mqdes, const struct mq_attr *__restrict newattr, struct mq_attr *__restrict oldattr); | Sets the message queue attributes specified by the descriptor.|
</td>
| version | #include <libc.h> | const char *libc_get_version_string(void); | Obtains the libc version string.|
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p1120131121416"><aname="p1120131121416"></a><aname="p1120131121416"></a>Obtains the name of a thread.</p>
| | #include <libc.h> | int libc_get_version(void); | Obtains the libc version.|
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p7201217144"><aname="p7201217144"></a><aname="p7201217144"></a>Sets the thread name.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p1720111112148"><aname="p1720111112148"></a><aname="p1720111112148"></a>Unblocks the threads that are currently blocked on the condition variable.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p22026131420"><aname="p22026131420"></a><aname="p22026131420"></a>Unblocks a thread.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p15202412148"><aname="p15202412148"></a><aname="p15202412148"></a>Waits for the condition.</p>
<tdclass="cellrowborder"valign="top"width="23.46%"headers="mcps1.2.5.1.4 "><pid="p183909541887"><aname="p183909541887"></a><aname="p183909541887"></a>Obtains the folder name.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p14579163095016"><aname="p14579163095016"></a><aname="p14579163095016"></a>Reads a directory.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p5747174219504"><aname="p5747174219504"></a><aname="p5747174219504"></a>Deletes a file.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.2 "><pid="p1086884114190"><aname="p1086884114190"></a><aname="p1086884114190"></a>int open(const char *path, int oflags, ...);</p>
</td>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p16795164855018"><aname="p16795164855018"></a><aname="p16795164855018"></a>Opens a file. If the file does not exist, create a file and open it.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p1256220291104"><aname="p1256220291104"></a><aname="p1256220291104"></a>Closes a file.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p1764122081011"><aname="p1764122081011"></a><aname="p1764122081011"></a>Renames the specified file.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p964218202105"><aname="p964218202105"></a><aname="p964218202105"></a>Opens the specified directory.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p166421201108"><aname="p166421201108"></a><aname="p166421201108"></a>Closes the specified directory.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p1364242013103"><aname="p1364242013103"></a><aname="p1364242013103"></a>Mounts a file system.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p26421520191017"><aname="p26421520191017"></a><aname="p26421520191017"></a>Unmounts a file system.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.2 "><pid="p95296218264"><aname="p95296218264"></a><aname="p95296218264"></a>int umount2(const char *target, int flag);</p>
</td>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p19642420121015"><aname="p19642420121015"></a><aname="p19642420121015"></a>Unmounts a file system.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p250115236125"><aname="p250115236125"></a><aname="p250115236125"></a>Synchronizes the files associated with a specified file descriptor to a storage device.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p19966195644317"><aname="p19966195644317"></a><aname="p19966195644317"></a>Creates a directory.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p1350214237122"><aname="p1350214237122"></a><aname="p1350214237122"></a>Deletes a directory.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.2 "><pid="p18958172310427"><aname="p18958172310427"></a><aname="p18958172310427"></a>int fstat(int fd, struct stat *buf);</p>
</td>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p550222319127"><aname="p550222319127"></a><aname="p550222319127"></a>Obtains file status information.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p1489913149409"><aname="p1489913149409"></a><aname="p1489913149409"></a>Obtains the file system information of a file in the specified path.</p>
<tdclass="cellrowborder"valign="top"width="23.46%"headers="mcps1.2.5.1.4 "><pid="p12748242195017"><aname="p12748242195017"></a><aname="p12748242195017"></a>Obtains the time. Time zone is not supported. The return value of <strongid="b854143112452"><aname="b854143112452"></a><aname="b854143112452"></a>tz</strong> is empty.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p67488425509"><aname="p67488425509"></a><aname="p67488425509"></a>Converts a date and time to broken-down time or ASCII.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p1574918423504"><aname="p1574918423504"></a><aname="p1574918423504"></a>Obtains the time.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p77492042135013"><aname="p77492042135013"></a><aname="p77492042135013"></a>Obtains the time.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p1988125916818"><aname="p1988125916818"></a><aname="p1988125916818"></a>Converts a date and time to broken-down time or ASCII.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p712617191776"><aname="p712617191776"></a><aname="p712617191776"></a>Formats the date and time string.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p21261919971"><aname="p21261919971"></a><aname="p21261919971"></a>Obtains the calendar time.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p61272196713"><aname="p61272196713"></a><aname="p61272196713"></a>Obtains the thread time.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p31271119773"><aname="p31271119773"></a><aname="p31271119773"></a>Goes to hibernation (in μs).</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p4399174611118"><aname="p4399174611118"></a><aname="p4399174611118"></a>Pauses the calling thread till the specified time.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p140054661114"><aname="p140054661114"></a><aname="p140054661114"></a>Obtains the clock time.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p10400134620113"><aname="p10400134620113"></a><aname="p10400134620113"></a>Creates a timer for a thread.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p840054610114"><aname="p840054610114"></a><aname="p840054610114"></a>Deletes a thread timer.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p17400184616110"><aname="p17400184616110"></a><aname="p17400184616110"></a>Sets a timer for a thread.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.2 "><pid="p39151240396"><aname="p39151240396"></a><aname="p39151240396"></a>time_t time (time_t *t);</p>
</td>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p0400114651120"><aname="p0400114651120"></a><aname="p0400114651120"></a>Obtains the time.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p1489561511256"><aname="p1489561511256"></a><aname="p1489561511256"></a>Converts the time string into the time tm structure.</p>
<tdclass="cellrowborder"valign="top"width="23.46%"headers="mcps1.2.5.1.4 "><pid="p1312720191774"><aname="p1312720191774"></a><aname="p1312720191774"></a>Converts the character string into an integer (int).</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p17403642554"><aname="p17403642554"></a><aname="p17403642554"></a>Converts the character string into an integer (long).</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.2 "><pid="p696665919120"><aname="p696665919120"></a><aname="p696665919120"></a>long long atoll(const char *nptr);</p>
</td>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p13966125916120"><aname="p13966125916120"></a><aname="p13966125916120"></a>Converts the character string into an integer (long long).</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p1966145911128"><aname="p1966145911128"></a><aname="p1966145911128"></a>Checks for alphanumeric characters.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p169671059121216"><aname="p169671059121216"></a><aname="p169671059121216"></a>Checks for ASCII.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p296715911125"><aname="p296715911125"></a><aname="p296715911125"></a>Checks for numeric characters.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p4968175981219"><aname="p4968175981219"></a><aname="p4968175981219"></a>Checks for lowercase letters.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p119681659101217"><aname="p119681659101217"></a><aname="p119681659101217"></a>Checks for printable characters, including spaces.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p15386634201320"><aname="p15386634201320"></a><aname="p15386634201320"></a>Checks for a space.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p12388173491319"><aname="p12388173491319"></a><aname="p12388173491319"></a>Checks for uppercase letters.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p5388143416136"><aname="p5388143416136"></a><aname="p5388143416136"></a>Checks for hexadecimal digits.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.2 "><pid="p6593344145212"><aname="p6593344145212"></a><aname="p6593344145212"></a>long int random (void);</p>
</td>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p5593194455219"><aname="p5593194455219"></a><aname="p5593194455219"></a>Generates a random number.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.2 "><pid="p63897344133"><aname="p63897344133"></a><aname="p63897344133"></a>void srandom(unsigned int seed);</p>
</td>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p73891234131318"><aname="p73891234131318"></a><aname="p73891234131318"></a>Initializes the random number generator.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p12618135051410"><aname="p12618135051410"></a><aname="p12618135051410"></a>Obtains the current parameter of a variable parameter, returns the value of the specified type, and moves the pointer to the next parameter.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p19499185722618"><aname="p19499185722618"></a><aname="p19499185722618"></a>Defines the start position of the variable-length parameter list.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.2 "><pid="p17737164582311"><aname="p17737164582311"></a><aname="p17737164582311"></a>char *strchr(const char *s, int c);</p>
</td>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p6737945162312"><aname="p6737945162312"></a><aname="p6737945162312"></a>Locates the last occurrence of a character in a string.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p8738445122318"><aname="p8738445122318"></a><aname="p8738445122318"></a>Obtains the length of the initial segment of a string.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p1083374916219"><aname="p1083374916219"></a><aname="p1083374916219"></a>Copies a string to a new position.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p118815408213"><aname="p118815408213"></a><aname="p118815408213"></a>Calculates the length of a string.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p198942152256"><aname="p198942152256"></a><aname="p198942152256"></a>Compares strings of the specified length.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.2 "><pid="p489501515252"><aname="p489501515252"></a><aname="p489501515252"></a>char *strrchr(const char *s, int c);</p>
</td>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p08951815202511"><aname="p08951815202511"></a><aname="p08951815202511"></a>Locates the last occurrence of a character in a string.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p889519152258"><aname="p889519152258"></a><aname="p889519152258"></a>Searches for the specified string <strongid="b991414021816"><aname="b991414021816"></a><aname="b991414021816"></a>needle</strong>.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.2 "><pid="p1789315290252"><aname="p1789315290252"></a><aname="p1789315290252"></a>long int strtol(const char *nptr, char **endptr, int base);</p>
</td>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p1289342992512"><aname="p1289342992512"></a><aname="p1289342992512"></a>Converts a string into a long int value.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.2 "><pid="p689412912255"><aname="p689412912255"></a><aname="p689412912255"></a>unsigned long int strtoul(const char *nptr, char **endptr, int base);</p>
</td>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p289417291258"><aname="p289417291258"></a><aname="p289417291258"></a>Converts a string into an unsigned long int value.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.2 "><pid="p9894829122511"><aname="p9894829122511"></a><aname="p9894829122511"></a>unsigned long long int strtoull(const char *nptr, char **endptr,int base);</p>
</td>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p14894102918252"><aname="p14894102918252"></a><aname="p14894102918252"></a>Converts a string into an unsigned long long int value.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.2 "><pid="p19981124318343"><aname="p19981124318343"></a><aname="p19981124318343"></a>int regcomp(regex_t *preg, const char *regex, int cflags);</p>
</td>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p8981124317348"><aname="p8981124317348"></a><aname="p8981124317348"></a>Compiles a regular expression.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p998144310346"><aname="p998144310346"></a><aname="p998144310346"></a>Matches a regular expression.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p39311736183416"><aname="p39311736183416"></a><aname="p39311736183416"></a>Releases a regular expression.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p09325369349"><aname="p09325369349"></a><aname="p09325369349"></a>Returns an error description string of the specified error code.</p>
<tdclass="cellrowborder"valign="top"width="23.46%"headers="mcps1.2.5.1.4 "><pid="p1361918505143"><aname="p1361918505143"></a><aname="p1361918505143"></a>Returns the absolute value.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p962010508149"><aname="p962010508149"></a><aname="p962010508149"></a>Returns the natural logarithm (base-e logarithm) of <emid="i789692410344"><aname="i789692410344"></a><aname="i789692410344"></a>x</em>.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p166201750181419"><aname="p166201750181419"></a><aname="p166201750181419"></a>Returns <emid="i859117159342"><aname="i859117159342"></a><aname="i859117159342"></a>x</em> raised to the power of <emid="i8551201915349"><aname="i8551201915349"></a><aname="i8551201915349"></a>y</em>.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p105085501757"><aname="p105085501757"></a><aname="p105085501757"></a>Rounds off the value from zero to the nearest integer.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p1327664471912"><aname="p1327664471912"></a><aname="p1327664471912"></a>Returns the square root of <emid="i720017623418"><aname="i720017623418"></a><aname="i720017623418"></a>x</em>.</p>
<tdclass="cellrowborder"valign="top"width="23.46%"headers="mcps1.2.5.1.4 "><pid="p227616447197"><aname="p227616447197"></a><aname="p227616447197"></a>Clears the file end and error indication of a stream.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p1227774421919"><aname="p1227774421919"></a><aname="p1227774421919"></a>Closes a file stream.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p132771344121915"><aname="p132771344121915"></a><aname="p132771344121915"></a>Opens a file stream by using a file descriptor.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p17278194419196"><aname="p17278194419196"></a><aname="p17278194419196"></a>Tests the end-of-file indicator for the specified stream.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p128410571653"><aname="p128410571653"></a><aname="p128410571653"></a>Refreshes a stream.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.2 "><pid="p1588084092118"><aname="p1588084092118"></a><aname="p1588084092118"></a>char *fgets(char *s, int size, FILE *stream);</p>
</td>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p18801940102114"><aname="p18801940102114"></a><aname="p18801940102114"></a>Reads the next line of the stream.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p10880140102118"><aname="p10880140102118"></a><aname="p10880140102118"></a>Returns the file descriptor of a stream.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p883174917217"><aname="p883174917217"></a><aname="p883174917217"></a>Opens a stream.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p783244917218"><aname="p783244917218"></a><aname="p783244917218"></a>Writes a line to a specified stream.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p1083216496219"><aname="p1083216496219"></a><aname="p1083216496219"></a>Reads a stream.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.2 "><pid="p178338496215"><aname="p178338496215"></a><aname="p178338496215"></a>int fseek(FILE *stream, long offset, int whence);</p>
</td>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p2833174919213"><aname="p2833174919213"></a><aname="p2833174919213"></a>Sets the position of a stream pointer.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p1683384912115"><aname="p1683384912115"></a><aname="p1683384912115"></a>Obtains the position of a stream pointer.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p1073616453235"><aname="p1073616453235"></a><aname="p1073616453235"></a>Writes data to a stream.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p10737174515235"><aname="p10737174515235"></a><aname="p10737174515235"></a>Prints system error information.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p87379453239"><aname="p87379453239"></a><aname="p87379453239"></a>Re-positions a stream.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p125627296017"><aname="p125627296017"></a><aname="p125627296017"></a>Writes data to a file.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p35631629504"><aname="p35631629504"></a><aname="p35631629504"></a>Reads data from a file.</p>
<tdclass="cellrowborder"valign="top"width="23.46%"headers="mcps1.2.5.1.4 "><pid="p10895129162510"><aname="p10895129162510"></a><aname="p10895129162510"></a>Releases the dynamic memory allocated by calling <strongid="b1419118317499"><aname="b1419118317499"></a><aname="b1419118317499"></a>getaddrinfo</strong>.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.2 "><pid="p221835173315"><aname="p221835173315"></a><aname="p221835173315"></a>int getnameinfo(const struct sockaddr *restrict sa, socklen_t salen,char *restrict node, socklen_t nodelen, char *restrict service,socklen_t servicelen, int flags);</p>
</td>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p1218205163319"><aname="p1218205163319"></a><aname="p1218205163319"></a>Performs address-to-name translation in a protocol-independent manner.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.2 "><pid="p1921815123316"><aname="p1921815123316"></a><aname="p1921815123316"></a>unsigned int if_nametoindex(const char *ifname);</p>
</td>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p19219115193319"><aname="p19219115193319"></a><aname="p19219115193319"></a>Obtains the index based on the network interface name.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p42195512335"><aname="p42195512335"></a><aname="p42195512335"></a>Converts the network host address from dotted decimal notation to binary format.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p521911553320"><aname="p521911553320"></a><aname="p521911553320"></a>Converts the network host address from binary format to dotted decimal notation.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.2 "><pid="p2881174042110"><aname="p2881174042110"></a><aname="p2881174042110"></a>int listen(int sockfd, int backlog);</p>
</td>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p1688114014216"><aname="p1688114014216"></a><aname="p1688114014216"></a>Listens for sockets.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.2 "><pid="p104501116614"><aname="p104501116614"></a><aname="p104501116614"></a>ssize_t recvmsg(int sockfd, struct msghdr *msg, int flags);</p>
</td>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p184507117613"><aname="p184507117613"></a><aname="p184507117613"></a>Receives a message from a socket. Note that the IOV size can be 1 only, and the ancillary message is not supported.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p1597954313346"><aname="p1597954313346"></a><aname="p1597954313346"></a>Sends messages from a socket.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.2 "><pid="p1198012436344"><aname="p1198012436344"></a><aname="p1198012436344"></a>ssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags);</p>
</td>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p13980243183417"><aname="p13980243183417"></a><aname="p13980243183417"></a>Sends messages from a socket. Ancillary messages are not supported.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p7980194311344"><aname="p7980194311344"></a><aname="p7980194311344"></a>Sends messages from a socket.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.2 "><pid="p15980164323416"><aname="p15980164323416"></a><aname="p15980164323416"></a>int setsockopt(int sockfd, int level, int optname,const void *optval, socklen_t optlen);</p>
</td>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p11980043103411"><aname="p11980043103411"></a><aname="p11980043103411"></a>Sets the options associated with a socket.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p1448013943410"><aname="p1448013943410"></a><aname="p1448013943410"></a>Releases the memory space to which the PTR pointer points.</p>
<tdclass="cellrowborder"valign="top"width="23.46%"headers="mcps1.2.5.1.4 "><pid="p388892013404"><aname="p388892013404"></a><aname="p388892013404"></a>Locks a semaphore for a specified period of time.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.2 "><pid="p1158019187910"><aname="p1158019187910"></a><aname="p1158019187910"></a>int sem_init(sem_t *sem, int pshared, unsigned int value);</p>
</td>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p7580718798"><aname="p7580718798"></a><aname="p7580718798"></a>Creates and initializes an anonymous semaphore.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p658019185916"><aname="p658019185916"></a><aname="p658019185916"></a>Increments the semaphore count.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p3581618993"><aname="p3581618993"></a><aname="p3581618993"></a>Obtains the semaphore.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.2 "><pid="p10205191101411"><aname="p10205191101411"></a><aname="p10205191101411"></a>mqd_t mq_open(const char *mqName, int openFlag, ...);</p>
</td>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p020517151411"><aname="p020517151411"></a><aname="p020517151411"></a>Opens an existing message queue with the specified name or creates a message queue.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p82058181420"><aname="p82058181420"></a><aname="p82058181420"></a>Closes the message queue with the specified descriptor.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p5205213140"><aname="p5205213140"></a><aname="p5205213140"></a>Puts a message with the specified content and length into a message queue with the specified descriptor.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p12059120142"><aname="p12059120142"></a><aname="p12059120142"></a>Deletes the oldest message from the message queue with the specified descriptor and places it in the buffer pointed to by <strongid="b1031572273419"><aname="b1031572273419"></a><aname="b1031572273419"></a>msg_ptr</strong>.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p192059121411"><aname="p192059121411"></a><aname="p192059121411"></a>Puts a message with the specified content and length into a message queue identified by the specified descriptor within specified time.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p1520641121417"><aname="p1520641121417"></a><aname="p1520641121417"></a>Obtains a message with the specified content and length from a message queue specified by the descriptor.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p220661141420"><aname="p220661141420"></a><aname="p220661141420"></a>Sets the attributes of the message queue specified by the descriptor.</p>
<tdclass="cellrowborder"valign="top"width="23.46%"headers="mcps1.2.5.1.4 "><pid="p132041115142"><aname="p132041115142"></a><aname="p132041115142"></a>Obtains the libc version string.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.5.1.3 "><pid="p7204910140"><aname="p7204910140"></a><aname="p7204910140"></a>Obtains the libc version.</p>
</td>
</tr>
</tbody>
</table>
### Important Notes<a name="section109174418147"></a>
### Important Notes<a name="section109174418147"></a>
<tdclass="cellrowborder"valign="top"width="39.156084391560846%"headers="mcps1.1.5.1.3 "><pid="p861613566169"><aname="p861613566169"></a><aname="p861613566169"></a>Operation not permitted</p>
| EINVAL | 22 | Invalid argument |
</td>
| ENFILE* | 23 | File table overflow |
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p1118714279189"><aname="p1118714279189"></a><aname="p1118714279189"></a>The operation is not allowed.</p>
<tdclass="cellrowborder"valign="top"width="39.156084391560846%"headers="mcps1.1.5.1.3 "><pid="p18616195618167"><aname="p18616195618167"></a><aname="p18616195618167"></a>No such file or directory</p>
| ERANGE | 34 | Math result not representable |
</td>
| EDEADLK | 35 | Resource deadlock would occur |
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p1187827161819"><aname="p1187827161819"></a><aname="p1187827161819"></a>The file or directory does not exist.</p>
<tdclass="cellrowborder"valign="top"width="39.156084391560846%"headers="mcps1.1.5.1.3 "><pid="p5616115614168"><aname="p5616115614168"></a><aname="p5616115614168"></a>No such process</p>
| ELNRNG | 48 | Link number out of range |
</td>
| EBADR | 53 | Invalid request descriptor |
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p1018714272182"><aname="p1018714272182"></a><aname="p1018714272182"></a>There is no such process (not supported currently).</p>
| EOVERFLOW | 75 | Value too large for defined data type |
<tdclass="cellrowborder"valign="top"width="39.156084391560846%"headers="mcps1.1.5.1.3 "><pid="p7617135620164"><aname="p7617135620164"></a><aname="p7617135620164"></a>Interrupted system call</p>
| EMSGSIZE | 90 | Message too long |
</td>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p4188192741814"><aname="p4188192741814"></a><aname="p4188192741814"></a>The system call is interrupted.</p>
<tdclass="cellrowborder"valign="top"width="39.156084391560846%"headers="mcps1.1.5.1.3 "><pid="p2617165612163"><aname="p2617165612163"></a><aname="p2617165612163"></a>No such device or address</p>
</td>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p3188627191815"><aname="p3188627191815"></a><aname="p3188627191815"></a>The device or address does not exist.</p>
<tdclass="cellrowborder"valign="top"width="39.156084391560846%"headers="mcps1.1.5.1.3 "><pid="p0352134781911"><aname="p0352134781911"></a><aname="p0352134781911"></a>Arg list too long</p>
</td>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p435214761913"><aname="p435214761913"></a><aname="p435214761913"></a>The parameter list is too long.</p>
<tdclass="cellrowborder"valign="top"width="39.156084391560846%"headers="mcps1.1.5.1.3 "><pid="p1014011526195"><aname="p1014011526195"></a><aname="p1014011526195"></a>Exec format error</p>
</td>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p16140165210195"><aname="p16140165210195"></a><aname="p16140165210195"></a>The execution format is incorrect.</p>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p24067113203"><aname="p24067113203"></a><aname="p24067113203"></a>There is no child process (not supported currently).</p>
<tdclass="cellrowborder"valign="top"width="39.156084391560846%"headers="mcps1.1.5.1.3 "><pid="p1237231772016"><aname="p1237231772016"></a><aname="p1237231772016"></a>Out of memory</p>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p63721717192011"><aname="p63721717192011"></a><aname="p63721717192011"></a>The permission is rejected.</p>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p14373101710201"><aname="p14373101710201"></a><aname="p14373101710201"></a>The address is incorrect.</p>
<tdclass="cellrowborder"valign="top"width="39.156084391560846%"headers="mcps1.1.5.1.3 "><pid="p13731717142019"><aname="p13731717142019"></a><aname="p13731717142019"></a>Device or resource busy</p>
</td>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p5373917182015"><aname="p5373917182015"></a><aname="p5373917182015"></a>The device or resource is engaged.</p>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p1762317261203"><aname="p1762317261203"></a><aname="p1762317261203"></a>The cross-device link is invalid.</p>
<tdclass="cellrowborder"valign="top"width="39.156084391560846%"headers="mcps1.1.5.1.3 "><pid="p7623122611209"><aname="p7623122611209"></a><aname="p7623122611209"></a>No such device</p>
</td>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p762372662018"><aname="p762372662018"></a><aname="p762372662018"></a>The device does not exist.</p>
<tdclass="cellrowborder"valign="top"width="39.156084391560846%"headers="mcps1.1.5.1.3 "><pid="p96231426132012"><aname="p96231426132012"></a><aname="p96231426132012"></a>Not a directory</p>
</td>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p46241026132015"><aname="p46241026132015"></a><aname="p46241026132015"></a>It is not a directory.</p>
<tdclass="cellrowborder"valign="top"width="39.156084391560846%"headers="mcps1.1.5.1.3 "><pid="p3624182610205"><aname="p3624182610205"></a><aname="p3624182610205"></a>Is a directory</p>
</td>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p1662432615206"><aname="p1662432615206"></a><aname="p1662432615206"></a>It is a directory.</p>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p4624132613202"><aname="p4624132613202"></a><aname="p4624132613202"></a>The parameter is invalid.</p>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p1562552618204"><aname="p1562552618204"></a><aname="p1562552618204"></a>The number of file systems opened exceeds the limit.</p>
<tdclass="cellrowborder"valign="top"width="39.156084391560846%"headers="mcps1.1.5.1.3 "><pid="p1662515264201"><aname="p1662515264201"></a><aname="p1662515264201"></a>Too many open files</p>
</td>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p126259262202"><aname="p126259262202"></a><aname="p126259262202"></a>The number of files opened exceeds the limit.</p>
<tdclass="cellrowborder"valign="top"width="39.156084391560846%"headers="mcps1.1.5.1.3 "><pid="p15636145917193"><aname="p15636145917193"></a><aname="p15636145917193"></a>File too large</p>
</td>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p1763655971914"><aname="p1763655971914"></a><aname="p1763655971914"></a>The file is too large.</p>
<tdclass="cellrowborder"valign="top"width="39.156084391560846%"headers="mcps1.1.5.1.3 "><pid="p19935174017202"><aname="p19935174017202"></a><aname="p19935174017202"></a>No space left on device</p>
</td>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p149351540182020"><aname="p149351540182020"></a><aname="p149351540182020"></a>There is no space on the device.</p>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p2936240132017"><aname="p2936240132017"></a><aname="p2936240132017"></a>The file system is read-only.</p>
<tdclass="cellrowborder"valign="top"width="39.156084391560846%"headers="mcps1.1.5.1.3 "><pid="p17936340182019"><aname="p17936340182019"></a><aname="p17936340182019"></a>Too many links</p>
</td>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p69361540122015"><aname="p69361540122015"></a><aname="p69361540122015"></a>There are too many links.</p>
<tdclass="cellrowborder"valign="top"width="39.156084391560846%"headers="mcps1.1.5.1.3 "><pid="p493714017209"><aname="p493714017209"></a><aname="p493714017209"></a>Math argument out of domain</p>
</td>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p19937194013202"><aname="p19937194013202"></a><aname="p19937194013202"></a>The value is out of range.</p>
<tdclass="cellrowborder"valign="top"width="39.156084391560846%"headers="mcps1.1.5.1.3 "><pid="p9937104052017"><aname="p9937104052017"></a><aname="p9937104052017"></a>Math result not representable</p>
</td>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p2937184012012"><aname="p2937184012012"></a><aname="p2937184012012"></a>The result is not representative.</p>
<tdclass="cellrowborder"valign="top"width="39.156084391560846%"headers="mcps1.1.5.1.3 "><pid="p17937440122016"><aname="p17937440122016"></a><aname="p17937440122016"></a>Resource deadlock would occur</p>
<tdclass="cellrowborder"valign="top"width="39.156084391560846%"headers="mcps1.1.5.1.3 "><pid="p1693864022011"><aname="p1693864022011"></a><aname="p1693864022011"></a>Filename too long</p>
</td>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p693816405205"><aname="p693816405205"></a><aname="p693816405205"></a>The file name is too long.</p>
<tdclass="cellrowborder"valign="top"width="39.156084391560846%"headers="mcps1.1.5.1.3 "><pid="p159381440172017"><aname="p159381440172017"></a><aname="p159381440172017"></a>No record locks available</p>
</td>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p593814400200"><aname="p593814400200"></a><aname="p593814400200"></a>There is no lock available.</p>
<tdclass="cellrowborder"valign="top"width="39.156084391560846%"headers="mcps1.1.5.1.3 "><pid="p11938144014202"><aname="p11938144014202"></a><aname="p11938144014202"></a>Function not implemented</p>
</td>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p119385407204"><aname="p119385407204"></a><aname="p119385407204"></a>The function is not implemented.</p>
<tdclass="cellrowborder"valign="top"width="39.156084391560846%"headers="mcps1.1.5.1.3 "><pid="p1793914022012"><aname="p1793914022012"></a><aname="p1793914022012"></a>Directory not empty</p>
</td>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p2939640102011"><aname="p2939640102011"></a><aname="p2939640102011"></a>The directory is not empty.</p>
<tdclass="cellrowborder"valign="top"width="39.156084391560846%"headers="mcps1.1.5.1.3 "><pid="p39391140192013"><aname="p39391140192013"></a><aname="p39391140192013"></a>Too many symbolic links encountered</p>
</td>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p893914002015"><aname="p893914002015"></a><aname="p893914002015"></a>There are too many symbolic link layers.</p>
<tdclass="cellrowborder"valign="top"width="39.156084391560846%"headers="mcps1.1.5.1.3 "><pid="p6940104012203"><aname="p6940104012203"></a><aname="p6940104012203"></a>No message of desired type</p>
</td>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p2094044014203"><aname="p2094044014203"></a><aname="p2094044014203"></a>There is no message of the expected type.</p>
<tdclass="cellrowborder"valign="top"width="39.156084391560846%"headers="mcps1.1.5.1.3 "><pid="p69431040132015"><aname="p69431040132015"></a><aname="p69431040132015"></a>Link number out of range</p>
</td>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p594374014204"><aname="p594374014204"></a><aname="p594374014204"></a>The number of links exceeds the limit.</p>
<tdclass="cellrowborder"valign="top"width="39.156084391560846%"headers="mcps1.1.5.1.3 "><pid="p19724331315"><aname="p19724331315"></a><aname="p19724331315"></a>Device not a stream</p>
</td>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p147943181312"><aname="p147943181312"></a><aname="p147943181312"></a>The device is not a character stream.</p>
<tdclass="cellrowborder"valign="top"width="39.156084391560846%"headers="mcps1.1.5.1.3 "><pid="p38643181312"><aname="p38643181312"></a><aname="p38643181312"></a>No data available</p>
</td>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p88164321314"><aname="p88164321314"></a><aname="p88164321314"></a>No data is available.</p>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p1881543131310"><aname="p1881543131310"></a><aname="p1881543131310"></a>The timer has expired.</p>
<tdclass="cellrowborder"valign="top"width="39.156084391560846%"headers="mcps1.1.5.1.3 "><pid="p2126438135"><aname="p2126438135"></a><aname="p2126438135"></a>Not a data message</p>
</td>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p11284331314"><aname="p11284331314"></a><aname="p11284331314"></a>It is not a data message.</p>
<tdclass="cellrowborder"valign="top"width="39.156084391560846%"headers="mcps1.1.5.1.3 "><pid="p161334341317"><aname="p161334341317"></a><aname="p161334341317"></a>Value too large for defined data type</p>
</td>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p9132043151316"><aname="p9132043151316"></a><aname="p9132043151316"></a>The value is too large for the data type.</p>
<tdclass="cellrowborder"valign="top"width="39.156084391560846%"headers="mcps1.1.5.1.3 "><pid="p121794331317"><aname="p121794331317"></a><aname="p121794331317"></a>Message too long</p>
</td>
<tdclass="cellrowborder"valign="top"width="33.57664233576642%"headers="mcps1.1.5.1.4 "><pid="p91718438133"><aname="p91718438133"></a><aname="p91718438133"></a>The message is too long.</p>
</td>
</tr>
</tbody>
</table>
### Development Example<a name="section206149278155"></a>
### Development Example<a name="section206149278155"></a>
...
@@ -1634,4 +291,3 @@ The execution result of **DemoForTest** is as follows:
...
@@ -1634,4 +291,3 @@ The execution result of **DemoForTest** is as follows:
++++++++++++++ Hello world ThreadFn tid = 48 ++++++++++++++
++++++++++++++ Hello world ThreadFn tid = 48 ++++++++++++++
| Creating or deleting an interrupt| LOS_HwiCreate | Creates an interrupt and registers the interrupt ID, triggering mode, priority, and interrupt handler. When an interrupt is triggered, the interrupt handler will be called.|
| | LOS_IntLock | Disables the CPU from responding to interrupt requests.|
</th>
| | LOS_IntRestore | Restores the interrupt status before the **LOS_IntLock** and **LOS_IntUnLock** operations are performed.|
</tr>
| Enabling or disabling an interrupt| LOS_HwiDisable | Disables the CPU from responding to the specified interrupt by setting the register.|
</thead>
| | LOS_HwiEnable | Enables the CPU to respond to the specified interrupt by setting the register.|
<tbody><trid="row14701707188"><tdclass="cellrowborder"rowspan="2"valign="top"width="12.85128512851285%"headers="mcps1.2.4.1.1 "><pid="p54707061819"><aname="p54707061819"></a><aname="p54707061819"></a>Creating or deleting interrupts</p>
| Setting the interrupt priority| LOS_HwiSetPriority | Sets the interrupt priority.|
</td>
| Triggering an interrupt| LOS_HwiTrigger | Triggers an interrupt (simulate an external interrupt by writing the related register of the interrupt controller).|
| Clearing interrupt register status| LOS_HwiClear | Clears the status bit of the interrupt register corresponding to the interrupt ID. The implementation of this API depends on the interrupt controller version. It is optional.|
</td>
<tdclass="cellrowborder"valign="top"width="57.34573457345735%"headers="mcps1.2.4.1.3 "><pid="p74706011818"><aname="p74706011818"></a><aname="p74706011818"></a>Creates an interrupt and registers the interrupt ID, interrupt triggering mode, interrupt priority, and interrupt handler. When an interrupt is triggered, the interrupt handler will be called.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p114700091815"><aname="p114700091815"></a><aname="p114700091815"></a>Deletes an interrupt based on the specified interrupt ID.</p>
</td>
</tr>
<trid="row15470506188"><tdclass="cellrowborder"rowspan="3"valign="top"width="12.85128512851285%"headers="mcps1.2.4.1.1 "><pid="p147010001812"><aname="p147010001812"></a><aname="p147010001812"></a>Enabling or disabling interrupts</p>
<tdclass="cellrowborder"valign="top"width="57.34573457345735%"headers="mcps1.2.4.1.3 "><pid="p1847018014188"><aname="p1847018014188"></a><aname="p1847018014188"></a>Enables the CPU to respond to all interrupt requests.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p194719071819"><aname="p194719071819"></a><aname="p194719071819"></a>Disables the CPU from responding to interrupt requests.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p1947100121811"><aname="p1947100121811"></a><aname="p1947100121811"></a>Restores the interrupt status before the <strongid="b160497829844357"><aname="b160497829844357"></a><aname="b160497829844357"></a>LOS_IntLock</strong> and <strongid="b123452092644357"><aname="b123452092644357"></a><aname="b123452092644357"></a>LOS_IntUnLock</strong> operations are performed.</p>
</td>
</tr>
</tbody>
</table>
## How to Develop<a name="section11841123033618"></a>
## How to Develop<a name="section11841123033618"></a>
1. Create an interrupt by calling **HalHwiCreate**.
1.Call **LOS_HwiCreate** to create an interrupt.
2. Call **TestHwiTrigger** to trigger the specified interrupt. \(This API is defined in the test suite. It simulates an external interrupt by writing the related register of the interrupt controller. Skip this step for common peripheral devices.\)
2.Call **LOS_HwiTrigger** to trigger the interrupt.
3. Call **HalHwiDelete** to delete the specified interrupt. Use this API based on actual requirements.
3.Call **LOS_HwiDelete** to delete the specified interrupt. Use this API based on actual requirements.
| Creating or deleting a task| LOS_TaskCreateOnly | Creates a task and suspends the task to disable scheduling of the task. To enable scheduling of the task, call **LOS_TaskResume** to make the task enter the Ready state.|
| | LOS_TaskCreate | Creates a task and places the task in the Ready state. If there is no task with a higher priority in the Ready queue, the task will be executed.|
| Controlling task status| LOS_TaskResume | Resumes a suspended task to place it in the Ready state.|
</th>
| | LOS_TaskSuspend | Suspends the specified task and performs task switching.|
</tr>
| | LOS_TaskJoin | Suspends this task till the specified task is complete and the task control block resources are reclaimed.|
</thead>
| | LOS_TaskDetach | Changes the task attribute from **joinable** to **detach**. After the task of the **detach** attribute is complete, the task control block resources will be automatically reclaimed.|
<tbody><trid="row4287183182010"><tdclass="cellrowborder"rowspan="3"valign="top"width="12.85128512851285%"headers="mcps1.2.4.1.1 "><pid="p6287831122018"><aname="p6287831122018"></a><aname="p6287831122018"></a>Creating or deleting a task</p>
| | LOS_TaskDelay | Makes a task wait for a period of time (in ticks) and releases CPU resources. When the delay time expires, the task enters the Ready state again. The input parameter is the number of ticks.|
</td>
| | LOS_Msleep | Converts the input number of milliseconds into number of ticks, and use the result to call **LOS_TaskDelay**.|
| | LOS_TaskYield | Sets the time slice of the current task to **0** to release CPU resources and schedule the task with the highest priority in the Ready queue to run.|
</td>
| Controlling task scheduling| LOS_TaskLock | Locks task scheduling. However, tasks can still be interrupted.|
<tdclass="cellrowborder"valign="top"width="57.34573457345735%"headers="mcps1.2.4.1.3 "><pid="p14287173112013"><aname="p14287173112013"></a><aname="p14287173112013"></a>Creates a task and suspends the task to disable scheduling of the task. To enable scheduling of the task, call <strongid="b129220316444426"><aname="b129220316444426"></a><aname="b129220316444426"></a>LOS_TaskResume</strong> to make the task enter the Ready state.</p>
| | LOS_TaskUnlock | Unlocks task scheduling.|
</td>
| | LOS_Schedule | Triggers task scheduling|
</tr>
| Controlling task priority| LOS_CurTaskPriSet | Sets the priority for the current task.|
| | LOS_TaskPriSet | Sets the priority for a specified task.|
</td>
| | LOS_TaskPriGet | Obtains the priority of a specified task.|
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p12886315207"><aname="p12886315207"></a><aname="p12886315207"></a>Creates a task and places the task in the Ready state. If there is no task with a higher priority in the Ready queue, the task will be executed.</p>
| Obtaining Job information| LOS_CurTaskIDGet | Obtains the ID of the current task.|
</td>
| | LOS_NextTaskIDGet | Obtains the ID of the task with the highest priority in the Ready queue.|
</tr>
| | LOS_NewTaskIDGet | Same as **LOS_NextTaskIDGet**.|
| | LOS_CurTaskNameGet | Obtains the name of the current task.|
</td>
| | LOS_TaskNameGet | Obtains the name of a specified task.|
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p17288133172017"><aname="p17288133172017"></a><aname="p17288133172017"></a>Deletes the specified task.</p>
| | LOS_TaskStatusGet | Obtains the state of a specified task.|
</td>
| | LOS_TaskInfoGet | Obtains information about a specified task, including the task state, priority, stack size, stack pointer (SP), task entry function, and used stack space.|
</tr>
| | LOS_TaskIsRunning | Checks whether the task module has started scheduling.|
<tdclass="cellrowborder"valign="top"width="57.34573457345735%"headers="mcps1.2.4.1.3 "><pid="p228823192011"><aname="p228823192011"></a><aname="p228823192011"></a>Resumes a suspended task to place the task in the Ready state.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p628816315207"><aname="p628816315207"></a><aname="p628816315207"></a>Suspends the specified task and performs task switching.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p20288123172015"><aname="p20288123172015"></a><aname="p20288123172015"></a>Suspends this task till the specified task is complete and the task control block resources are reclaimed.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p202881831192011"><aname="p202881831192011"></a><aname="p202881831192011"></a>Makes a task wait for a period of time (in ticks) and releases CPU resources. When the delay time expires, the task enters the Ready state again. The input parameter is the number of ticks.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p128803112012"><aname="p128803112012"></a><aname="p128803112012"></a>Converts the input parameter number of milliseconds into number of ticks, and use the result to call <strongid="b56235690044426"><aname="b56235690044426"></a><aname="b56235690044426"></a>LOS_TaskDelay</strong>.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p1728893192018"><aname="p1728893192018"></a><aname="p1728893192018"></a>Sets the time slice of the current task to <strongid="b5591310044426"><aname="b5591310044426"></a><aname="b5591310044426"></a>0</strong> to release CPU resources and schedule the task with the highest priority in the Ready queue to run.</p>
<tdclass="cellrowborder"valign="top"width="57.34573457345735%"headers="mcps1.2.4.1.3 "><pid="p328863117203"><aname="p328863117203"></a><aname="p328863117203"></a>Locks task scheduling. However, tasks can still be interrupted.</p>
<tdclass="cellrowborder"valign="top"width="57.34573457345735%"headers="mcps1.2.4.1.3 "><pid="p728993182020"><aname="p728993182020"></a><aname="p728993182020"></a>Sets the priority for the current task.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p20289163122017"><aname="p20289163122017"></a><aname="p20289163122017"></a>Sets the priority for a specified task.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p228933119206"><aname="p228933119206"></a><aname="p228933119206"></a>Obtains the priority of a specified task.</p>
<tdclass="cellrowborder"valign="top"width="57.34573457345735%"headers="mcps1.2.4.1.3 "><pid="p15289031122015"><aname="p15289031122015"></a><aname="p15289031122015"></a>Obtains the ID of the current task.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p16289133142013"><aname="p16289133142013"></a><aname="p16289133142013"></a>Obtains the ID of the task with the highest priority in the Ready queue.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p18289163192018"><aname="p18289163192018"></a><aname="p18289163192018"></a>Same as <strongid="b59459526844426"><aname="b59459526844426"></a><aname="b59459526844426"></a>LOS_NextTaskIDGet</strong>.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p10289631132012"><aname="p10289631132012"></a><aname="p10289631132012"></a>Obtains the name of the current task.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p4289331142014"><aname="p4289331142014"></a><aname="p4289331142014"></a>Obtains the name of a specified task.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p19289153142013"><aname="p19289153142013"></a><aname="p19289153142013"></a>Obtains the state of a specified task.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p62901231112010"><aname="p62901231112010"></a><aname="p62901231112010"></a>Obtains information about a specified task, including the task state, priority, stack size, stack pointer (SP), task entry function, and used stack space.</p>
<tdclass="cellrowborder"valign="top"headers="mcps1.2.4.1.2 "><pid="p1290113114206"><aname="p1290113114206"></a><aname="p1290113114206"></a>Checks whether the task module has started scheduling.</p>
</td>
</tr>
<trid="row1529017317206"><tdclass="cellrowborder"valign="top"width="12.85128512851285%"headers="mcps1.2.4.1.1 "><pid="p14290143162014"><aname="p14290143162014"></a><aname="p14290143162014"></a>Maintaining and testing task information</p>
<tdclass="cellrowborder"valign="top"width="57.34573457345735%"headers="mcps1.2.4.1.3 "><pid="p17290153116200"><aname="p17290153116200"></a><aname="p17290153116200"></a>Obtains task switching information. The macro <strongid="b125259128644426"><aname="b125259128644426"></a><aname="b125259128644426"></a>LOSCFG_BASE_CORE_EXC_TSK_SWITCH</strong> must be enabled.</p>
</td>
</tr>
</tbody>
</table>
## How to Develop<a name="section783435801510"></a>
## How to Develop<a name="section783435801510"></a>