Rich Felker | 2318207 | 2011-09-20 12:14:06 -0400 | [diff] [blame^] | 1 | #ifndef _MQUEUE_H |
| 2 | #define _MQUEUE_H |
Rich Felker | ab11386 | 2011-06-07 01:52:27 -0400 | [diff] [blame] | 3 | #ifdef __cplusplus |
| 4 | extern "C" { |
| 5 | #endif |
| 6 | |
| 7 | #define __NEED_size_t |
| 8 | #define __NEED_ssize_t |
| 9 | #define __NEED_pthread_attr_t |
| 10 | #define __NEED_time_t |
| 11 | #define __NEED_struct_timespec |
| 12 | #include <bits/alltypes.h> |
| 13 | |
| 14 | typedef int mqd_t; |
| 15 | struct mq_attr { |
| 16 | long mq_flags, mq_maxmsg, mq_msgsize, mq_curmsgs, __unused[4]; |
| 17 | }; |
| 18 | struct sigevent; |
| 19 | |
| 20 | int mq_close(mqd_t); |
| 21 | int mq_getattr(mqd_t, struct mq_attr *); |
| 22 | int mq_notify(mqd_t, const struct sigevent *); |
| 23 | mqd_t mq_open(const char *, int, ...); |
| 24 | ssize_t mq_receive(mqd_t, char *, size_t, unsigned *); |
| 25 | int mq_send(mqd_t, const char *, size_t, unsigned); |
| 26 | int mq_setattr(mqd_t, const struct mq_attr *, struct mq_attr *); |
| 27 | ssize_t mq_timedreceive(mqd_t, char *, size_t, unsigned *, const struct timespec *); |
| 28 | int mq_timedsend(mqd_t, const char *, size_t, unsigned, const struct timespec *); |
| 29 | int mq_unlink(const char *); |
| 30 | |
| 31 | #ifdef __cplusplus |
| 32 | } |
| 33 | #endif |
| 34 | #endif |