Xenomai 3.3.2
Loading...
Searching...
No Matches
mqueue.h
1/*
2 * Copyright (C) 2005 Philippe Gerum <rpm@xenomai.org>.
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
17 */
18#pragma GCC system_header
19#include_next <mqueue.h>
20
21#ifndef _COBALT_MQUEUE_H
22#define _COBALT_MQUEUE_H
23
24#include <cobalt/wrappers.h>
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30COBALT_DECL(mqd_t, mq_open, (const char *name, int oflags, ...));
31
32COBALT_DECL(int, mq_close, (mqd_t qd));
33
34COBALT_DECL(int, mq_unlink, (const char *name));
35
36COBALT_DECL(int, mq_getattr, (mqd_t qd, struct mq_attr *attr));
37
38COBALT_DECL(int, mq_setattr,
39 (mqd_t qd, const struct mq_attr *__restrict__ attr,
40 struct mq_attr *__restrict__ oattr));
41
42COBALT_DECL(int, mq_send,
43 (mqd_t qd, const char *buffer, size_t len, unsigned prio));
44
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));
48
49COBALT_DECL(ssize_t, mq_receive,
50 (mqd_t q, char *buffer, size_t len, unsigned *prio));
51
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));
56
57COBALT_DECL(int, mq_notify, (mqd_t q, const struct sigevent *evp));
58
59#ifdef __cplusplus
60}
61#endif
62
63#endif /* !_COBALT_MQUEUE_H */
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