Xenomai 3.3.2
Loading...
Searching...
No Matches
compat.h
1/*
2 * Copyright (C) 2014 Philippe Gerum <rpm@xenomai.org>
3 *
4 * Xenomai is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * Xenomai is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * 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#ifndef _COBALT_KERNEL_COMPAT_H
19#define _COBALT_KERNEL_COMPAT_H
20
21#ifdef CONFIG_XENO_ARCH_SYS3264
22
23#include <linux/compat.h>
24#include <net/compat.h>
25#include <asm/xenomai/wrappers.h>
26#include <cobalt/uapi/sched.h>
27
28struct mq_attr;
29
30struct compat_mq_attr {
31 compat_long_t mq_flags;
32 compat_long_t mq_maxmsg;
33 compat_long_t mq_msgsize;
34 compat_long_t mq_curmsgs;
35};
36
37typedef struct {
38 compat_ulong_t fds_bits[__FD_SETSIZE / (8 * sizeof(compat_long_t))];
39} compat_fd_set;
40
41struct compat_rtdm_mmap_request {
42 u64 offset;
43 compat_size_t length;
44 int prot;
45 int flags;
46};
47
48int sys32_get_timespec(struct timespec64 *ts,
49 const struct old_timespec32 __user *cts);
50
51int sys32_put_timespec(struct old_timespec32 __user *cts,
52 const struct timespec64 *ts);
53
54int sys32_get_itimerspec(struct itimerspec64 *its,
55 const struct old_itimerspec32 __user *cits);
56
57int sys32_put_itimerspec(struct old_itimerspec32 __user *cits,
58 const struct itimerspec64 *its);
59
60int sys32_get_timeval(struct __kernel_old_timeval *tv,
61 const struct old_timeval32 __user *ctv);
62
63int sys32_put_timeval(struct old_timeval32 __user *ctv,
64 const struct __kernel_old_timeval *tv);
65
66int sys32_get_timex(struct __kernel_timex *tx,
67 const struct old_timex32 __user *ctx);
68
69int sys32_put_timex(struct old_timex32 __user *ctx,
70 const struct __kernel_timex *tx);
71
72int sys32_get_fdset(fd_set *fds, const compat_fd_set __user *cfds,
73 size_t cfdsize);
74
75int sys32_put_fdset(compat_fd_set __user *cfds, const fd_set *fds,
76 size_t fdsize);
77
78int sys32_get_mqattr(struct mq_attr *ap,
79 const struct compat_mq_attr __user *u_cap);
80
81int sys32_put_mqattr(struct compat_mq_attr __user *u_cap,
82 const struct mq_attr *ap);
83
84int sys32_get_sigevent(struct sigevent *ev,
85 const struct compat_sigevent *__user u_cev);
86
87int sys32_get_sigset(sigset_t *set, const compat_sigset_t *u_cset);
88
89int sys32_put_sigset(compat_sigset_t *u_cset, const sigset_t *set);
90
91int sys32_get_sigval(union sigval *val, const union compat_sigval *u_cval);
92
93int sys32_put_siginfo(void __user *u_si, const struct siginfo *si,
94 int overrun);
95
96int sys32_get_msghdr(struct user_msghdr *msg,
97 const struct compat_msghdr __user *u_cmsg);
98
99int sys32_get_mmsghdr(struct mmsghdr *mmsg,
100 const struct compat_mmsghdr __user *u_cmmsg);
101
102int sys32_put_msghdr(struct compat_msghdr __user *u_cmsg,
103 const struct user_msghdr *msg);
104
105int sys32_put_mmsghdr(struct compat_mmsghdr __user *u_cmmsg,
106 const struct mmsghdr *mmsg);
107
108int sys32_get_iovec(struct iovec *iov,
109 const struct compat_iovec __user *ciov,
110 int ciovlen);
111
112int sys32_put_iovec(struct compat_iovec __user *u_ciov,
113 const struct iovec *iov,
114 int iovlen);
115
116#endif /* CONFIG_XENO_ARCH_SYS3264 */
117
118#endif /* !_COBALT_KERNEL_COMPAT_H */