diff options
| author | Kacper <kacper@mail.openlinux.dev> | 2025-12-07 20:10:31 +0100 |
|---|---|---|
| committer | Kacper <kacper@mail.openlinux.dev> | 2025-12-07 20:10:31 +0100 |
| commit | fc00c656c96528112d05cf0edf8631bd5eaea446 (patch) | |
| tree | a6e0e6c588191a8bd1c64afc3b7a258e3e66c236 /include/mqueue.h | |
Add build system scaffolding and libc headers
Diffstat (limited to 'include/mqueue.h')
| -rw-r--r-- | include/mqueue.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/include/mqueue.h b/include/mqueue.h new file mode 100644 index 00000000..7af98b58 --- /dev/null +++ b/include/mqueue.h @@ -0,0 +1,47 @@ +#ifndef __MQUEUE_H +#define __MQUEUE_H + +#define __BITS_TIMESPEC_H_ +#include <bits/timespec.h> +#undef __BITS_TIMESPEC_H_ + +#undef O_RDONLY +#define O_RDONLY 000000000 +#undef O_WRONLY +#define O_WRONLY 000000001 +#undef O_RDWR +#define O_RDWR 00000002 + +#undef O_CREAT +#define O_CREAT 00000100 +#undef O_EXCL +#define O_EXCL 00000200 +#undef O_NONBLOCK +#define O_NONBLOCK 00004000 + +typedef int mqd_t; +typedef __SIZE_TYPE__ size_t; +typedef __INT64_TYPE__ ssize_t; + +struct sigevent; +struct mq_attr { + long mq_flags; + long mq_maxmsg; + long mq_msgsize; + long mq_curmsgs; +}; + +int mq_close(mqd_t); +int mq_getattr(mqd_t, struct mq_attr *); +int mq_notify(mqd_t, const struct sigevent *); +mqd_t mq_open(const char *, int, ...); +ssize_t mq_receive(mqd_t, char *, size_t, unsigned *); +int mq_send(mqd_t, const char *, size_t, unsigned); +int mq_setattr(mqd_t, const struct mq_attr *restrict, struct mq_attr *restrict); +ssize_t mq_timedreceive(mqd_t, char *restrict, size_t, unsigned *restrict, + const struct timespec *restrict); +int mq_timedsend(mqd_t, const char *, size_t, unsigned, + const struct timespec *); +int mq_unlink(const char *); + +#endif |
