Xenomai  3.0.8
internal.h
1 /*
2  * Copyright (C) 2005-2007 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 
20 #ifndef _RTDM_INTERNAL_H
21 #define _RTDM_INTERNAL_H
22 
23 #include <linux/types.h>
24 #include <linux/list.h>
25 #include <linux/sem.h>
26 #include <linux/file.h>
27 #include <linux/atomic.h>
28 #include <cobalt/kernel/tree.h>
29 #include <cobalt/kernel/lock.h>
30 #include <rtdm/driver.h>
31 
32 static inline void __rtdm_get_device(struct rtdm_device *device)
33 {
34  atomic_inc(&device->refcount);
35 }
36 
37 void __rtdm_put_device(struct rtdm_device *device);
38 
39 struct rtdm_device *__rtdm_get_namedev(const char *path);
40 
41 struct rtdm_device *__rtdm_get_protodev(int protocol_family,
42  int socket_type);
43 
44 void __rtdm_dev_close(struct rtdm_fd *fd);
45 
46 int __rtdm_dev_ioctl_core(struct rtdm_fd *fd,
47  unsigned int request, void __user *arg);
48 
49 int __rtdm_mmap_from_fdop(struct rtdm_fd *fd, size_t len, off_t offset,
50  int prot, int flags, void **pptr);
51 
52 int rtdm_init(void);
53 
54 void rtdm_cleanup(void);
55 
56 extern const struct file_operations rtdm_dumb_fops;
57 
58 #endif /* _RTDM_INTERNAL_H */
Real-Time Driver Model for Xenomai, driver API header.
RTDM device.
Definition: driver.h:338