| | #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 ++++++++++++++