Xenomai 3.3.2
Loading...
Searching...
No Matches
mqueue.h
1/*
2 * Written by Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
8 *
9 * This program 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
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18
19#ifndef _COBALT_POSIX_MQUEUE_H
20#define _COBALT_POSIX_MQUEUE_H
21
22#include <linux/types.h>
23#include <linux/fcntl.h>
24#include <xenomai/posix/syscall.h>
25
26struct mq_attr {
27 long mq_flags;
28 long mq_maxmsg;
29 long mq_msgsize;
30 long mq_curmsgs;
31};
32
33int __cobalt_mq_open(const char __user *u_name, int oflags,
34 mode_t mode, struct mq_attr *attr);
35
36int __cobalt_mq_getattr(mqd_t uqd, struct mq_attr *attr);
37
38int __cobalt_mq_timedsend(mqd_t uqd, const void __user *u_buf, size_t len,
39 unsigned int prio, const void __user *u_ts,
40 int (*fetch_timeout)(struct timespec64 *ts,
41 const void __user *u_ts));
42
43int __cobalt_mq_timedreceive(mqd_t uqd, void __user *u_buf,
44 ssize_t *lenp,
45 unsigned int __user *u_prio,
46 const void __user *u_ts,
47 int (*fetch_timeout)(struct timespec64 *ts,
48 const void __user *u_ts));
49
50int __cobalt_mq_timedreceive64(mqd_t uqd, void __user *u_buf,
51 ssize_t *len,
52 unsigned int __user *u_prio,
53 const void __user *u_ts);
54
55int __cobalt_mq_notify(mqd_t fd, const struct sigevent *evp);
56
57COBALT_SYSCALL_DECL(mq_open,
58 (const char __user *u_name, int oflags,
59 mode_t mode, struct mq_attr __user *u_attr));
60
61COBALT_SYSCALL_DECL(mq_close, (mqd_t uqd));
62
63COBALT_SYSCALL_DECL(mq_unlink, (const char __user *u_name));
64
65COBALT_SYSCALL_DECL(mq_getattr, (mqd_t uqd, struct mq_attr __user *u_attr));
66
67COBALT_SYSCALL_DECL(mq_timedsend,
68 (mqd_t uqd, const void __user *u_buf, size_t len,
69 unsigned int prio, const struct __kernel_old_timespec __user *u_ts));
70
71COBALT_SYSCALL_DECL(mq_timedsend64,
72 (mqd_t uqd, const void __user *u_buf, size_t len,
73 unsigned int prio,
74 const struct __kernel_timespec __user *u_ts));
75
76COBALT_SYSCALL_DECL(mq_timedreceive,
77 (mqd_t uqd, void __user *u_buf, ssize_t __user *u_len,
78 unsigned int __user *u_prio,
79 const struct __kernel_old_timespec __user *u_ts));
80
81COBALT_SYSCALL_DECL(mq_timedreceive64,
82 (mqd_t uqd, void __user *u_buf, ssize_t __user *u_len,
83 unsigned int __user *u_prio,
84 const struct __kernel_timespec __user *u_ts));
85
86COBALT_SYSCALL_DECL(mq_notify,
87 (mqd_t fd, const struct sigevent *__user evp));
88
89#endif /* !_COBALT_POSIX_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_unlink(const char *name))
Unlink a message queue.
Definition mq.c:182