18#pragma GCC system_header
19#include_next <mqueue.h>
21#ifndef _COBALT_MQUEUE_H
22#define _COBALT_MQUEUE_H
24#include <cobalt/wrappers.h>
30COBALT_DECL(mqd_t,
mq_open, (
const char *name,
int oflags, ...));
32COBALT_DECL(
int,
mq_close, (mqd_t qd));
34COBALT_DECL(
int,
mq_unlink, (
const char *name));
36COBALT_DECL(
int,
mq_getattr, (mqd_t qd,
struct mq_attr *attr));
39 (mqd_t qd,
const struct mq_attr *__restrict__ attr,
40 struct mq_attr *__restrict__ oattr));
43 (mqd_t qd,
const char *buffer,
size_t len,
unsigned prio));
45COBALT_DECL_TIME64(
int, mq_timedsend, __mq_timedsend_time64,
46 (mqd_t q,
const char *buffer,
size_t len,
unsigned prio,
47 const struct timespec *timeout));
50 (mqd_t q,
char *buffer,
size_t len,
unsigned *prio));
52COBALT_DECL_TIME64(ssize_t, mq_timedreceive, __mq_timedreceive_time64,
53 (mqd_t q,
char *__restrict__ buffer,
size_t len,
54 unsigned *__restrict__ prio,
55 const struct timespec *__restrict__ timeout));
57COBALT_DECL(
int,
mq_notify, (mqd_t q,
const struct sigevent *evp));
int mq_close(mqd_t qd))
Close a message queue.
Definition mq.c:146
int mq_notify(mqd_t q, const struct sigevent *evp))
Enable notification on message arrival.
Definition mq.c:584
int mq_getattr(mqd_t qd, struct mq_attr *attr))
Get message queue attributes.
Definition mq.c:221
mqd_t mq_open(const char *name, int oflags,...))
Open a message queue.
Definition mq.c:103
int mq_setattr(mqd_t qd, const struct mq_attr *__restrict__ attr, struct mq_attr *__restrict__ oattr))
Set message queue attributes.
Definition mq.c:264
int mq_unlink(const char *name))
Unlink a message queue.
Definition mq.c:182
int mq_send(mqd_t qd, const char *buffer, size_t len, unsigned prio))
Send a message to a message queue.
Definition mq.c:340
ssize_t mq_receive(mqd_t q, char *buffer, size_t len, unsigned *prio))
Receive a message from a message queue.
Definition mq.c:468