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