Xenomai  3.0.5
rtnet_internal.h
1 /***
2  *
3  * rtnet_internal.h - internal declarations
4  *
5  * RTnet - real-time networking subsystem
6  * Copyright (C) 1999 Lineo, Inc
7  * 1999, 2002 David A. Schleef <ds@schleef.org>
8  * 2002 Ulrich Marx <marx@kammer.uni-hannover.de>
9  * 2003-2005 Jan Kiszka <jan.kiszka@web.de>
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24  *
25  */
26 
27 #ifndef __RTNET_INTERNAL_H_
28 #define __RTNET_INTERNAL_H_
29 
30 #include <linux/module.h>
31 
32 #include <rtdm/driver.h>
33 
34 
35 #ifdef CONFIG_XENO_DRIVERS_NET_CHECKED
36 #define RTNET_ASSERT(expr, func) \
37  if (!(expr)) \
38  { \
39  rtdm_printk("Assertion failed! %s:%s:%d %s\n", \
40  __FILE__, __FUNCTION__, __LINE__, (#expr)); \
41  func \
42  }
43 #else
44 #define RTNET_ASSERT(expr, func)
45 #endif /* CONFIG_XENO_DRIVERS_NET_CHECKED */
46 
47 /* some configurables */
48 
49 #define RTNET_DEF_STACK_PRIORITY \
50  RTDM_TASK_HIGHEST_PRIORITY + RTDM_TASK_LOWER_PRIORITY
51 /*#define RTNET_RTDEV_PRIORITY 5*/
52 
53 
54 struct rtnet_device;
55 
56 /*struct rtnet_msg {
57  int msg_type;
58  struct rtnet_device *rtdev;
59 };*/
60 
61 
62 struct rtnet_mgr {
63  rtdm_task_t task;
64 /* MBX mbx;*/
65  rtdm_event_t event;
66 };
67 
68 
69 extern struct rtnet_mgr STACK_manager;
70 extern struct rtnet_mgr RTDEV_manager;
71 
72 extern const char rtnet_rtdm_provider_name[];
73 
74 
75 #ifdef CONFIG_XENO_OPT_VFILE
76 extern struct xnvfile_directory rtnet_proc_root;
77 #endif /* CONFIG_XENO_OPT_VFILE */
78 
79 #include <linux/mutex.h>
80 
81 #endif /* __RTNET_INTERNAL_H_ */
Real-Time Driver Model for Xenomai, driver API header.