Xenomai  3.1
io.h
1 /*
2  * Copyright (C) 2005 Jan Kiszka <jan.kiszka@web.de>.
3  * Copyright (C) 2005 Joerg Langenberg <joerg.langenberg@gmx.net>.
4  *
5  * Xenomai is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * Xenomai is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with Xenomai; if not, write to the Free Software Foundation,
17  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18  */
19 #ifndef _COBALT_POSIX_IO_H
20 #define _COBALT_POSIX_IO_H
21 
22 #include <rtdm/rtdm.h>
23 #include <xenomai/posix/syscall.h>
24 #include <cobalt/kernel/select.h>
25 
26 int __cobalt_first_fd_valid_p(fd_set *fds[XNSELECT_MAX_TYPES], int nfds);
27 
28 int __cobalt_select_bind_all(struct xnselector *selector,
29  fd_set *fds[XNSELECT_MAX_TYPES], int nfds);
30 
31 COBALT_SYSCALL_DECL(open,
32  (const char __user *u_path, int oflag));
33 
34 COBALT_SYSCALL_DECL(socket,
35  (int protocol_family,
36  int socket_type, int protocol));
37 
38 COBALT_SYSCALL_DECL(close, (int fd));
39 
40 COBALT_SYSCALL_DECL(fcntl, (int fd, int cmd, long arg));
41 
42 COBALT_SYSCALL_DECL(ioctl,
43  (int fd, unsigned int request, void __user *arg));
44 
45 COBALT_SYSCALL_DECL(read,
46  (int fd, void __user *buf, size_t size));
47 
48 COBALT_SYSCALL_DECL(write,
49  (int fd, const void __user *buf, size_t size));
50 
51 COBALT_SYSCALL_DECL(recvmsg,
52  (int fd, struct user_msghdr __user *umsg, int flags));
53 
54 COBALT_SYSCALL_DECL(recvmmsg,
55  (int fd, struct mmsghdr __user *u_msgvec, unsigned int vlen,
56  unsigned int flags, struct timespec *u_timeout));
57 
58 COBALT_SYSCALL_DECL(sendmsg,
59  (int fd, struct user_msghdr __user *umsg, int flags));
60 
61 COBALT_SYSCALL_DECL(sendmmsg,
62  (int fd, struct mmsghdr __user *u_msgvec,
63  unsigned int vlen, unsigned int flags));
64 
65 COBALT_SYSCALL_DECL(mmap,
66  (int fd, struct _rtdm_mmap_request __user *u_rma,
67  void __user * __user *u_addrp));
68 
69 COBALT_SYSCALL_DECL(select,
70  (int nfds,
71  fd_set __user *u_rfds,
72  fd_set __user *u_wfds,
73  fd_set __user *u_xfds,
74  struct timeval __user *u_tv));
75 
76 #endif /* !_COBALT_POSIX_IO_H */