Xenomai  3.1-devel
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 #include <linux/mutex.h>
32 #include <rtdm/driver.h>
33 
34 #ifdef CONFIG_XENO_DRIVERS_NET_CHECKED
35 #define RTNET_ASSERT(expr, func) \
36  if (!(expr)) \
37  { \
38  rtdm_printk("Assertion failed! %s:%s:%d %s\n", \
39  __FILE__, __FUNCTION__, __LINE__, (#expr)); \
40  func \
41  }
42 #else
43 #define RTNET_ASSERT(expr, func)
44 #endif /* CONFIG_XENO_DRIVERS_NET_CHECKED */
45 
46 /* some configurables */
47 
48 #define RTNET_DEF_STACK_PRIORITY \
49  RTDM_TASK_HIGHEST_PRIORITY + RTDM_TASK_LOWER_PRIORITY
50 /*#define RTNET_RTDEV_PRIORITY 5*/
51 
52 
53 struct rtnet_device;
54 
55 /*struct rtnet_msg {
56  int msg_type;
57  struct rtnet_device *rtdev;
58 };*/
59 
60 
61 struct rtnet_mgr {
62  rtdm_task_t task;
63 /* MBX mbx;*/
64  rtdm_event_t event;
65 };
66 
67 
68 extern struct rtnet_mgr STACK_manager;
69 extern struct rtnet_mgr RTDEV_manager;
70 
71 extern const char rtnet_rtdm_provider_name[];
72 
73 
74 #ifdef CONFIG_XENO_OPT_VFILE
75 extern struct xnvfile_directory rtnet_proc_root;
76 #endif /* CONFIG_XENO_OPT_VFILE */
77 
78 extern struct class *rtnet_class;
79 
80 #endif /* __RTNET_INTERNAL_H_ */
Real-Time Driver Model for Xenomai, driver API header.