Xenomai  3.0.8
syscall32.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_POSIX_SYSCALL32_H
19 #define _COBALT_POSIX_SYSCALL32_H
20 
21 #include <cobalt/kernel/compat.h>
22 
23 struct cobalt_mutex_shadow;
24 struct cobalt_event_shadow;
25 struct cobalt_cond_shadow;
26 struct cobalt_sem_shadow;
27 struct cobalt_monitor_shadow;
28 
29 COBALT_SYSCALL32emu_DECL(thread_create,
30  (compat_ulong_t pth,
31  int policy,
32  const struct compat_sched_param_ex __user *u_param_ex,
33  int xid,
34  __u32 __user *u_winoff));
35 
36 COBALT_SYSCALL32emu_DECL(thread_setschedparam_ex,
37  (compat_ulong_t pth,
38  int policy,
39  const struct compat_sched_param_ex __user *u_param,
40  __u32 __user *u_winoff,
41  int __user *u_promoted));
42 
43 COBALT_SYSCALL32emu_DECL(thread_getschedparam_ex,
44  (compat_ulong_t pth,
45  int __user *u_policy,
46  struct compat_sched_param_ex __user *u_param));
47 
48 COBALT_SYSCALL32emu_DECL(clock_getres,
49  (clockid_t clock_id,
50  struct compat_timespec __user *u_ts));
51 
52 COBALT_SYSCALL32emu_DECL(clock_gettime,
53  (clockid_t clock_id,
54  struct compat_timespec __user *u_ts));
55 
56 COBALT_SYSCALL32emu_DECL(clock_settime,
57  (clockid_t clock_id,
58  const struct compat_timespec __user *u_ts));
59 
60 COBALT_SYSCALL32emu_DECL(clock_nanosleep,
61  (clockid_t clock_id, int flags,
62  const struct compat_timespec __user *u_rqt,
63  struct compat_timespec __user *u_rmt));
64 
65 COBALT_SYSCALL32emu_DECL(mutex_timedlock,
66  (struct cobalt_mutex_shadow __user *u_mx,
67  const struct compat_timespec __user *u_ts));
68 
69 COBALT_SYSCALL32emu_DECL(cond_wait_prologue,
70  (struct cobalt_cond_shadow __user *u_cnd,
71  struct cobalt_mutex_shadow __user *u_mx,
72  int *u_err,
73  unsigned int timed,
74  struct compat_timespec __user *u_ts));
75 
76 COBALT_SYSCALL32emu_DECL(mq_open,
77  (const char __user *u_name, int oflags,
78  mode_t mode, struct compat_mq_attr __user *u_attr));
79 
80 COBALT_SYSCALL32emu_DECL(mq_getattr,
81  (mqd_t uqd, struct compat_mq_attr __user *u_attr));
82 
83 COBALT_SYSCALL32emu_DECL(mq_timedsend,
84  (mqd_t uqd, const void __user *u_buf, size_t len,
85  unsigned int prio,
86  const struct compat_timespec __user *u_ts));
87 
88 COBALT_SYSCALL32emu_DECL(mq_timedreceive,
89  (mqd_t uqd, void __user *u_buf,
90  compat_ssize_t __user *u_len,
91  unsigned int __user *u_prio,
92  const struct compat_timespec __user *u_ts));
93 
94 COBALT_SYSCALL32x_DECL(mq_timedreceive,
95  (mqd_t uqd, void __user *u_buf,
96  compat_ssize_t __user *u_len,
97  unsigned int __user *u_prio,
98  const struct timespec __user *u_ts));
99 
100 COBALT_SYSCALL32emu_DECL(mq_notify,
101  (mqd_t fd, const struct compat_sigevent *__user u_cev));
102 
103 COBALT_SYSCALL32emu_DECL(sched_weightprio,
104  (int policy,
105  const struct compat_sched_param_ex __user *u_param));
106 
107 COBALT_SYSCALL32emu_DECL(sched_setconfig_np,
108  (int cpu, int policy,
109  union compat_sched_config __user *u_config,
110  size_t len));
111 
112 COBALT_SYSCALL32emu_DECL(sched_getconfig_np,
113  (int cpu, int policy,
114  union compat_sched_config __user *u_config,
115  size_t len));
116 
117 COBALT_SYSCALL32emu_DECL(sched_setscheduler_ex,
118  (compat_pid_t pid,
119  int policy,
120  const struct compat_sched_param_ex __user *u_param,
121  __u32 __user *u_winoff,
122  int __user *u_promoted));
123 
124 COBALT_SYSCALL32emu_DECL(sched_getscheduler_ex,
125  (compat_pid_t pid,
126  int __user *u_policy,
127  struct compat_sched_param_ex __user *u_param));
128 
129 COBALT_SYSCALL32emu_DECL(timer_create,
130  (clockid_t clock,
131  const struct compat_sigevent __user *u_sev,
132  timer_t __user *u_tm));
133 
134 COBALT_SYSCALL32emu_DECL(timer_settime,
135  (timer_t tm, int flags,
136  const struct compat_itimerspec __user *u_newval,
137  struct compat_itimerspec __user *u_oldval));
138 
139 COBALT_SYSCALL32emu_DECL(timer_gettime,
140  (timer_t tm,
141  struct compat_itimerspec __user *u_val));
142 
143 COBALT_SYSCALL32emu_DECL(timerfd_settime,
144  (int fd, int flags,
145  const struct compat_itimerspec __user *new_value,
146  struct compat_itimerspec __user *old_value));
147 
148 COBALT_SYSCALL32emu_DECL(timerfd_gettime,
149  (int fd, struct compat_itimerspec __user *value));
150 
151 COBALT_SYSCALL32emu_DECL(sigwait,
152  (const compat_sigset_t __user *u_set,
153  int __user *u_sig));
154 
155 COBALT_SYSCALL32emu_DECL(sigtimedwait,
156  (const compat_sigset_t __user *u_set,
157  struct compat_siginfo __user *u_si,
158  const struct compat_timespec __user *u_timeout));
159 
160 COBALT_SYSCALL32emu_DECL(sigwaitinfo,
161  (const compat_sigset_t __user *u_set,
162  struct compat_siginfo __user *u_si));
163 
164 COBALT_SYSCALL32emu_DECL(sigpending,
165  (compat_old_sigset_t __user *u_set));
166 
167 COBALT_SYSCALL32emu_DECL(sigqueue,
168  (pid_t pid, int sig,
169  const union compat_sigval __user *u_value));
170 
171 COBALT_SYSCALL32emu_DECL(monitor_wait,
172  (struct cobalt_monitor_shadow __user *u_mon,
173  int event, const struct compat_timespec __user *u_ts,
174  int __user *u_ret));
175 
176 COBALT_SYSCALL32emu_DECL(event_wait,
177  (struct cobalt_event_shadow __user *u_event,
178  unsigned int bits,
179  unsigned int __user *u_bits_r,
180  int mode, const struct compat_timespec __user *u_ts));
181 
182 COBALT_SYSCALL32emu_DECL(select,
183  (int nfds,
184  compat_fd_set __user *u_rfds,
185  compat_fd_set __user *u_wfds,
186  compat_fd_set __user *u_xfds,
187  struct compat_timeval __user *u_tv));
188 
189 COBALT_SYSCALL32emu_DECL(recvmsg,
190  (int fd, struct compat_msghdr __user *umsg,
191  int flags));
192 
193 COBALT_SYSCALL32emu_DECL(sendmsg,
194  (int fd, struct compat_msghdr __user *umsg,
195  int flags));
196 
197 COBALT_SYSCALL32emu_DECL(mmap,
198  (int fd,
199  struct compat_rtdm_mmap_request __user *u_rma,
200  compat_uptr_t __user *u_addrp));
201 
202 COBALT_SYSCALL32emu_DECL(backtrace,
203  (int nr, compat_ulong_t __user *u_backtrace,
204  int reason));
205 
206 COBALT_SYSCALL32emu_DECL(sem_open,
207  (compat_uptr_t __user *u_addrp,
208  const char __user *u_name,
209  int oflags, mode_t mode, unsigned int value));
210 
211 COBALT_SYSCALL32emu_DECL(sem_timedwait,
212  (struct cobalt_sem_shadow __user *u_sem,
213  struct compat_timespec __user *u_ts));
214 
215 #endif /* !_COBALT_POSIX_SYSCALL32_H */
ssize_t sched_getconfig_np(int cpu, int policy, union sched_config *config, size_t *len_r)
Retrieve CPU-specific scheduler settings for a policy.
Definition: sched.c:598
int timer_create(clockid_t clockid, const struct sigevent *__restrict__ evp, timer_t *__restrict__ timerid)
Create a timer.
Definition: timer.c:74
int clock_getres(clockid_t clock_id, struct timespec *tp)
Get the resolution of the specified clock.
Definition: clock.c:100
int mq_getattr(mqd_t qd, struct mq_attr *attr)
Get message queue attributes.
Definition: mq.c:222
int timer_gettime(timer_t timerid, struct itimerspec *value)
Get timer next expiration date and reload value.
Definition: timer.c:208
int sched_setscheduler_ex(pid_t pid, int policy, const struct sched_param_ex *param_ex)
Set extended scheduling policy of a process.
Definition: sched.c:279
int timer_settime(timer_t timerid, int flags, const struct itimerspec *__restrict__ value, struct itimerspec *__restrict__ ovalue)
Start or stop a timer.
Definition: timer.c:165
int mq_notify(mqd_t q, const struct sigevent *evp)
Enable notification on message arrival.
Definition: mq.c:566
int clock_settime(clockid_t clock_id, const struct timespec *tp)
Set the specified clock.
Definition: clock.c:236
int mq_timedsend(mqd_t q, const char *buffer, size_t len, unsigned prio, const struct timespec *timeout)
Attempt, during a bounded time, to send a message to a message queue.
Definition: mq.c:386
int sched_getscheduler_ex(pid_t pid, int *policy_r, struct sched_param_ex *param_ex)
Get extended scheduling policy of a process.
Definition: sched.c:382
mqd_t mq_open(const char *name, int oflags,...)
Open a message queue.
Definition: mq.c:104
ssize_t mq_timedreceive(mqd_t q, char *__restrict__ buffer, size_t len, unsigned *__restrict__ prio, const struct timespec *__restrict__ timeout)
Attempt, during a bounded time, to receive a message from a message queue.
Definition: mq.c:509
int clock_gettime(clockid_t clock_id, struct timespec *tp)
Read the specified clock.
Definition: clock.c:181
int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp)
Sleep some amount of time.
Definition: clock.c:291
int sem_timedwait(sem_t *sem, const struct timespec *abs_timeout)
Attempt to decrement a semaphore with a time limit.
Definition: semaphore.c:365
int sched_setconfig_np(int cpu, int policy, const union sched_config *config, size_t len)
Set CPU-specific scheduler settings for a policy.
Definition: sched.c:541