hc
2024-11-01 2f529f9b558ca1c1bd74be7437a84e4711743404
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
/*
 * Copyright (C) 2014 Philippe Gerum <rpm@xenomai.org>
 *
 * Xenomai is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Xenomai is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
#ifndef _COBALT_POSIX_SYSCALL32_H
#define _COBALT_POSIX_SYSCALL32_H
 
#include <cobalt/kernel/compat.h>
 
struct cobalt_mutex_shadow;
struct cobalt_event_shadow;
struct cobalt_cond_shadow;
struct cobalt_sem_shadow;
struct cobalt_monitor_shadow;
 
COBALT_SYSCALL32emu_DECL(thread_create,
            (compat_ulong_t pth,
             int policy,
             const struct compat_sched_param_ex __user *u_param_ex,
             int xid,
             __u32 __user *u_winoff));
 
COBALT_SYSCALL32emu_DECL(thread_setschedparam_ex,
            (compat_ulong_t pth,
             int policy,
             const struct compat_sched_param_ex __user *u_param,
             __u32 __user *u_winoff,
             int __user *u_promoted));
 
COBALT_SYSCALL32emu_DECL(thread_getschedparam_ex,
            (compat_ulong_t pth,
             int __user *u_policy,
             struct compat_sched_param_ex __user *u_param));
 
COBALT_SYSCALL32emu_DECL(thread_setschedprio,
            (compat_ulong_t pth,
             int prio,
             __u32 __user *u_winoff,
             int __user *u_promoted));
 
COBALT_SYSCALL32emu_DECL(clock_getres,
            (clockid_t clock_id,
             struct old_timespec32 __user *u_ts));
 
COBALT_SYSCALL32emu_DECL(clock_getres64,
            (clockid_t clock_id,
             struct __kernel_timespec __user *u_ts));
 
COBALT_SYSCALL32emu_DECL(clock_gettime,
            (clockid_t clock_id,
             struct old_timespec32 __user *u_ts));
 
COBALT_SYSCALL32emu_DECL(clock_gettime64,
            (clockid_t clock_id,
             struct __kernel_timespec __user *u_ts));
 
COBALT_SYSCALL32emu_DECL(clock_settime,
            (clockid_t clock_id,
             const struct old_timespec32 __user *u_ts));
 
COBALT_SYSCALL32emu_DECL(clock_settime64,
            (clockid_t clock_id,
             const struct __kernel_timespec __user *u_ts));
 
COBALT_SYSCALL32emu_DECL(clock_adjtime,
            (clockid_t clock_id,
             struct old_timex32 __user *u_tx));
 
COBALT_SYSCALL32emu_DECL(clock_adjtime64,
            (clockid_t clock_id,
             struct __kernel_timex __user *u_tx));
 
COBALT_SYSCALL32emu_DECL(clock_nanosleep,
            (clockid_t clock_id, int flags,
             const struct old_timespec32 __user *u_rqt,
             struct old_timespec32 __user *u_rmt));
 
COBALT_SYSCALL32emu_DECL(clock_nanosleep64,
            (clockid_t clock_id, int flags,
             const struct __kernel_timespec __user *u_rqt,
             struct __kernel_timespec __user *u_rmt));
 
 
COBALT_SYSCALL32emu_DECL(mutex_timedlock,
            (struct cobalt_mutex_shadow __user *u_mx,
             const struct old_timespec32 __user *u_ts));
 
COBALT_SYSCALL32emu_DECL(mutex_timedlock64,
            (struct cobalt_mutex_shadow __user *u_mx,
             const struct __kernel_timespec __user *u_ts));
 
COBALT_SYSCALL32emu_DECL(cond_wait_prologue,
            (struct cobalt_cond_shadow __user *u_cnd,
             struct cobalt_mutex_shadow __user *u_mx,
             int *u_err,
             unsigned int timed,
             struct old_timespec32 __user *u_ts));
 
COBALT_SYSCALL32emu_DECL(mq_open,
            (const char __user *u_name, int oflags,
             mode_t mode, struct compat_mq_attr __user *u_attr));
 
COBALT_SYSCALL32emu_DECL(mq_getattr,
            (mqd_t uqd, struct compat_mq_attr __user *u_attr));
 
COBALT_SYSCALL32emu_DECL(mq_timedsend,
            (mqd_t uqd, const void __user *u_buf, size_t len,
             unsigned int prio,
             const struct old_timespec32 __user *u_ts));
 
COBALT_SYSCALL32emu_DECL(mq_timedsend64,
            (mqd_t uqd, const void __user *u_buf, size_t len,
             unsigned int prio,
             const struct __kernel_timespec __user *u_ts));
 
COBALT_SYSCALL32emu_DECL(mq_timedreceive,
            (mqd_t uqd, void __user *u_buf,
             compat_ssize_t __user *u_len,
             unsigned int __user *u_prio,
             const struct old_timespec32 __user *u_ts));
 
COBALT_SYSCALL32emu_DECL(mq_timedreceive64,
            (mqd_t uqd, void __user *u_buf,
             compat_ssize_t __user *u_len,
             unsigned int __user *u_prio,
             const struct __kernel_timespec __user *u_ts));
 
COBALT_SYSCALL32emu_DECL(mq_notify,
            (mqd_t fd, const struct compat_sigevent *__user u_cev));
 
COBALT_SYSCALL32emu_DECL(sched_weightprio,
            (int policy,
             const struct compat_sched_param_ex __user *u_param));
 
COBALT_SYSCALL32emu_DECL(sched_setconfig_np,
            (int cpu, int policy,
             union compat_sched_config __user *u_config,
             size_t len));
 
COBALT_SYSCALL32emu_DECL(sched_getconfig_np,
            (int cpu, int policy,
             union compat_sched_config __user *u_config,
             size_t len));
 
COBALT_SYSCALL32emu_DECL(sched_setscheduler_ex,
            (compat_pid_t pid,
             int policy,
             const struct compat_sched_param_ex __user *u_param,
             __u32 __user *u_winoff,
             int __user *u_promoted));
 
COBALT_SYSCALL32emu_DECL(sched_getscheduler_ex,
            (compat_pid_t pid,
             int __user *u_policy,
             struct compat_sched_param_ex __user *u_param));
 
COBALT_SYSCALL32emu_DECL(timer_create,
            (clockid_t clock,
             const struct compat_sigevent __user *u_sev,
             timer_t __user *u_tm));
 
COBALT_SYSCALL32emu_DECL(timer_settime,
            (timer_t tm, int flags,
             const struct old_itimerspec32 __user *u_newval,
             struct old_itimerspec32 __user *u_oldval));
 
COBALT_SYSCALL32emu_DECL(timer_gettime,
            (timer_t tm,
             struct old_itimerspec32 __user *u_val));
 
COBALT_SYSCALL32emu_DECL(timerfd_settime,
            (int fd, int flags,
             const struct old_itimerspec32 __user *new_value,
             struct old_itimerspec32 __user *old_value));
 
COBALT_SYSCALL32emu_DECL(timerfd_gettime,
            (int fd, struct old_itimerspec32 __user *value));
 
COBALT_SYSCALL32emu_DECL(sigwait,
            (const compat_sigset_t __user *u_set,
             int __user *u_sig));
 
COBALT_SYSCALL32emu_DECL(sigtimedwait,
            (const compat_sigset_t __user *u_set,
             struct compat_siginfo __user *u_si,
             const struct old_timespec32 __user *u_timeout));
 
COBALT_SYSCALL32emu_DECL(sigtimedwait64,
            (const compat_sigset_t __user *u_set,
             struct compat_siginfo __user *u_si,
             const struct __kernel_timespec __user *u_timeout));
 
COBALT_SYSCALL32emu_DECL(sigwaitinfo,
            (const compat_sigset_t __user *u_set,
             struct compat_siginfo __user *u_si));
 
COBALT_SYSCALL32emu_DECL(sigpending,
            (compat_old_sigset_t __user *u_set));
 
COBALT_SYSCALL32emu_DECL(sigqueue,
            (pid_t pid, int sig,
             const union compat_sigval __user *u_value));
 
COBALT_SYSCALL32emu_DECL(monitor_wait,
            (struct cobalt_monitor_shadow __user *u_mon,
             int event, const struct old_timespec32 __user *u_ts,
             int __user *u_ret));
 
COBALT_SYSCALL32emu_DECL(monitor_wait64,
            (struct cobalt_monitor_shadow __user *u_mon,
             int event,
             const struct __kernel_timespec __user *u_ts,
             int __user *u_ret));
 
COBALT_SYSCALL32emu_DECL(event_wait,
            (struct cobalt_event_shadow __user *u_event,
             unsigned int bits,
             unsigned int __user *u_bits_r,
             int mode, const struct old_timespec32 __user *u_ts));
 
COBALT_SYSCALL32emu_DECL(event_wait64,
            (struct cobalt_event_shadow __user *u_event,
             unsigned int bits,
             unsigned int __user *u_bits_r,
             int mode,
             const struct __kernel_timespec __user *u_ts));
 
COBALT_SYSCALL32emu_DECL(select,
            (int nfds,
             compat_fd_set __user *u_rfds,
             compat_fd_set __user *u_wfds,
             compat_fd_set __user *u_xfds,
             struct old_timeval32 __user *u_tv));
 
COBALT_SYSCALL32emu_DECL(recvmsg,
            (int fd, struct compat_msghdr __user *umsg,
             int flags));
 
COBALT_SYSCALL32emu_DECL(recvmmsg,
            (int fd, struct compat_mmsghdr __user *u_msgvec,
             unsigned int vlen,
             unsigned int flags, struct old_timespec32 *u_timeout));
 
COBALT_SYSCALL32emu_DECL(recvmmsg64,
            (int fd, struct compat_mmsghdr __user *u_msgvec,
             unsigned int vlen,
             unsigned int flags,
             struct __kernel_timespec *u_timeout));
 
COBALT_SYSCALL32emu_DECL(sendmsg,
            (int fd, struct compat_msghdr __user *umsg,
             int flags));
 
COBALT_SYSCALL32emu_DECL(sendmmsg,
            (int fd, struct compat_mmsghdr __user *u_msgvec, unsigned int vlen,
             unsigned int flags));
 
COBALT_SYSCALL32emu_DECL(mmap,
            (int fd,
             struct compat_rtdm_mmap_request __user *u_rma,
             compat_uptr_t __user *u_addrp));
 
COBALT_SYSCALL32emu_DECL(backtrace,
            (int nr, compat_ulong_t __user *u_backtrace,
             int reason));
 
COBALT_SYSCALL32emu_DECL(sem_open,
            (compat_uptr_t __user *u_addrp,
             const char __user *u_name,
             int oflags, mode_t mode, unsigned int value));
 
COBALT_SYSCALL32emu_DECL(sem_timedwait,
            (struct cobalt_sem_shadow __user *u_sem,
             const struct old_timespec32 __user *u_ts));
 
COBALT_SYSCALL32emu_DECL(sem_timedwait64,
            (struct cobalt_sem_shadow __user *u_sem,
             const struct __kernel_timespec __user *u_ts));
 
#endif /* !_COBALT_POSIX_SYSCALL32_H */