Xenomai 3.3.2
Loading...
Searching...
No Matches
event.h
1/*
2 * Copyright (C) 2012 Philippe Gerum <rpm@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_EVENT_H
20#define _COBALT_POSIX_EVENT_H
21
22#include <cobalt/kernel/synch.h>
23#include <cobalt/uapi/event.h>
24#include <xenomai/posix/syscall.h>
25#include <xenomai/posix/process.h>
26
27struct cobalt_resources;
28struct cobalt_process;
29
30struct cobalt_event {
31 unsigned int magic;
32 unsigned int value;
33 int flags;
34 struct xnsynch synch;
35 struct cobalt_event_state *state;
36 struct cobalt_resnode resnode;
37};
38
39int __cobalt_event_wait(struct cobalt_event_shadow __user *u_event,
40 unsigned int bits,
41 unsigned int __user *u_bits_r,
42 int mode, const struct timespec64 *ts);
43
44COBALT_SYSCALL_DECL(event_init,
45 (struct cobalt_event_shadow __user *u_evtsh,
46 unsigned int value,
47 int flags));
48
49COBALT_SYSCALL_DECL(event_wait,
50 (struct cobalt_event_shadow __user *u_evtsh,
51 unsigned int bits,
52 unsigned int __user *u_bits_r,
53 int mode,
54 const struct __kernel_old_timespec __user *u_ts));
55
56COBALT_SYSCALL_DECL(event_wait64,
57 (struct cobalt_event_shadow __user *u_evtsh,
58 unsigned int bits,
59 unsigned int __user *u_bits_r,
60 int mode,
61 const struct __kernel_timespec __user *u_ts));
62
63COBALT_SYSCALL_DECL(event_sync,
64 (struct cobalt_event_shadow __user *u_evtsh));
65
66COBALT_SYSCALL_DECL(event_destroy,
67 (struct cobalt_event_shadow __user *u_evtsh));
68
69COBALT_SYSCALL_DECL(event_inquire,
70 (struct cobalt_event_shadow __user *u_event,
71 struct cobalt_event_info __user *u_info,
72 pid_t __user *u_waitlist,
73 size_t waitsz));
74
75void cobalt_event_reclaim(struct cobalt_resnode *node,
76 spl_t s);
77
78#endif /* !_COBALT_POSIX_EVENT_H */