yuezonghe | 824eb0c | 2024-06-27 02:32:26 -0700 | [diff] [blame] | 1 | /* |
2 | * mq_close.c - close a message queue. | ||||
3 | */ | ||||
4 | |||||
5 | #include <errno.h> | ||||
6 | #include <unistd.h> | ||||
7 | #include <sys/syscall.h> | ||||
8 | |||||
9 | #include <mqueue.h> | ||||
10 | |||||
11 | #ifdef __NR_mq_open | ||||
12 | |||||
13 | /* | ||||
14 | * Remove the association between message queue descriptor and its | ||||
15 | * message queue. | ||||
16 | */ | ||||
17 | int mq_close(mqd_t mqdes) | ||||
18 | { | ||||
19 | return close(mqdes); | ||||
20 | } | ||||
21 | |||||
22 | #endif |