18 #ifndef _COBALT_POSIX_SYSCALL32_H 19 #define _COBALT_POSIX_SYSCALL32_H 21 #include <cobalt/kernel/compat.h> 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;
29 COBALT_SYSCALL32emu_DECL(thread_create,
32 const struct compat_sched_param_ex __user *u_param_ex,
34 __u32 __user *u_winoff));
36 COBALT_SYSCALL32emu_DECL(thread_setschedparam_ex,
39 const struct compat_sched_param_ex __user *u_param,
40 __u32 __user *u_winoff,
41 int __user *u_promoted));
43 COBALT_SYSCALL32emu_DECL(thread_getschedparam_ex,
46 struct compat_sched_param_ex __user *u_param));
50 struct compat_timespec __user *u_ts));
54 struct compat_timespec __user *u_ts));
58 const struct compat_timespec __user *u_ts));
60 COBALT_SYSCALL32emu_DECL(clock_adjtime,
62 struct compat_timex __user *u_tx));
65 (clockid_t clock_id,
int flags,
66 const struct compat_timespec __user *u_rqt,
67 struct compat_timespec __user *u_rmt));
69 COBALT_SYSCALL32emu_DECL(mutex_timedlock,
70 (
struct cobalt_mutex_shadow __user *u_mx,
71 const struct compat_timespec __user *u_ts));
73 COBALT_SYSCALL32emu_DECL(cond_wait_prologue,
74 (
struct cobalt_cond_shadow __user *u_cnd,
75 struct cobalt_mutex_shadow __user *u_mx,
78 struct compat_timespec __user *u_ts));
80 COBALT_SYSCALL32emu_DECL(
mq_open,
81 (
const char __user *u_name,
int oflags,
82 mode_t mode,
struct compat_mq_attr __user *u_attr));
85 (mqd_t uqd,
struct compat_mq_attr __user *u_attr));
88 (mqd_t uqd,
const void __user *u_buf,
size_t len,
90 const struct compat_timespec __user *u_ts));
93 (mqd_t uqd,
void __user *u_buf,
94 compat_ssize_t __user *u_len,
95 unsigned int __user *u_prio,
96 const struct compat_timespec __user *u_ts));
99 (mqd_t uqd,
void __user *u_buf,
100 compat_ssize_t __user *u_len,
101 unsigned int __user *u_prio,
102 const struct timespec __user *u_ts));
105 (mqd_t fd,
const struct compat_sigevent *__user u_cev));
107 COBALT_SYSCALL32emu_DECL(sched_weightprio,
109 const struct compat_sched_param_ex __user *u_param));
112 (
int cpu,
int policy,
113 union compat_sched_config __user *u_config,
117 (
int cpu,
int policy,
118 union compat_sched_config __user *u_config,
124 const struct compat_sched_param_ex __user *u_param,
125 __u32 __user *u_winoff,
126 int __user *u_promoted));
130 int __user *u_policy,
131 struct compat_sched_param_ex __user *u_param));
135 const struct compat_sigevent __user *u_sev,
136 timer_t __user *u_tm));
139 (timer_t tm,
int flags,
140 const struct compat_itimerspec __user *u_newval,
141 struct compat_itimerspec __user *u_oldval));
145 struct compat_itimerspec __user *u_val));
147 COBALT_SYSCALL32emu_DECL(timerfd_settime,
149 const struct compat_itimerspec __user *new_value,
150 struct compat_itimerspec __user *old_value));
152 COBALT_SYSCALL32emu_DECL(timerfd_gettime,
153 (
int fd,
struct compat_itimerspec __user *value));
155 COBALT_SYSCALL32emu_DECL(sigwait,
156 (
const compat_sigset_t __user *u_set,
159 COBALT_SYSCALL32emu_DECL(sigtimedwait,
160 (
const compat_sigset_t __user *u_set,
161 struct compat_siginfo __user *u_si,
162 const struct compat_timespec __user *u_timeout));
164 COBALT_SYSCALL32emu_DECL(sigwaitinfo,
165 (
const compat_sigset_t __user *u_set,
166 struct compat_siginfo __user *u_si));
168 COBALT_SYSCALL32emu_DECL(sigpending,
169 (compat_old_sigset_t __user *u_set));
171 COBALT_SYSCALL32emu_DECL(sigqueue,
173 const union compat_sigval __user *u_value));
175 COBALT_SYSCALL32emu_DECL(monitor_wait,
176 (
struct cobalt_monitor_shadow __user *u_mon,
177 int event,
const struct compat_timespec __user *u_ts,
180 COBALT_SYSCALL32emu_DECL(event_wait,
181 (
struct cobalt_event_shadow __user *u_event,
183 unsigned int __user *u_bits_r,
184 int mode,
const struct compat_timespec __user *u_ts));
186 COBALT_SYSCALL32emu_DECL(select,
188 compat_fd_set __user *u_rfds,
189 compat_fd_set __user *u_wfds,
190 compat_fd_set __user *u_xfds,
191 struct compat_timeval __user *u_tv));
193 COBALT_SYSCALL32emu_DECL(recvmsg,
194 (
int fd,
struct compat_msghdr __user *umsg,
197 COBALT_SYSCALL32emu_DECL(recvmmsg,
198 (
int fd,
struct compat_mmsghdr __user *u_msgvec,
200 unsigned int flags,
struct compat_timespec *u_timeout));
202 COBALT_SYSCALL32emu_DECL(sendmsg,
203 (
int fd,
struct compat_msghdr __user *umsg,
206 COBALT_SYSCALL32emu_DECL(sendmmsg,
207 (
int fd,
struct compat_mmsghdr __user *u_msgvec,
unsigned int vlen,
208 unsigned int flags));
210 COBALT_SYSCALL32emu_DECL(mmap,
212 struct compat_rtdm_mmap_request __user *u_rma,
213 compat_uptr_t __user *u_addrp));
215 COBALT_SYSCALL32emu_DECL(backtrace,
216 (
int nr, compat_ulong_t __user *u_backtrace,
219 COBALT_SYSCALL32emu_DECL(sem_open,
220 (compat_uptr_t __user *u_addrp,
221 const char __user *u_name,
222 int oflags, mode_t mode,
unsigned int value));
225 (
struct cobalt_sem_shadow __user *u_sem,
226 struct compat_timespec __user *u_ts));
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:609
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:288
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:393
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:306
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:552