Also use Objects as part of an operation but as a result don't generate Any operation...
[ACE_TAO.git] / ACE / ace / Rtems_init.c
blob389169d7a329262f4533e9e5f97bd0220a535596
2 #if defined (ACE_HAS_RTEMS)
4 #define RTEMS_BSP_NETWORK_DRIVER_NAME "ne1"
5 #define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_ne_driver_attach
6 #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 256
8 #define CONFIGURE_MAXIMUM_POSIX_THREADS 100
9 #define CONFIGURE_MAXIMUM_POSIX_MUTEXES 300
10 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 300
11 #define CONFIGURE_MAXIMUM_POSIX_KEYS 100
12 #define CONFIGURE_MAXIMUM_POSIX_TIMERS 100
13 #define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS 10
14 #define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 300
15 #define CONFIGURE_POSIX_INIT_THREAD_TABLE
16 #define CONFIGURE_POSIX_INIT_THREAD_ENTRY_POINT Init
17 #define CONFIGURE_MEMORY_FOR_POSIX (10*1024)
18 #define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE (10*1024)
20 #define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
21 #define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
23 #define CONFIGURE_EXECUTIVE_RAM_SIZE (512*1024)
25 #define CONFIGURE_MICROSECONDS_PER_TICK 10000
27 #define CONFIGURE_MAXIMUM_SEMAPHORES 100
28 #define CONFIGURE_MAXIMUM_TASKS 100
29 #define CONFIGURE_INIT_TASK_PRIORITY 120
30 #define CONFIGURE_INIT_TASK_INITIAL_MODES (RTEMS_PREEMPT | \
31 RTEMS_NO_TIMESLICE | \
32 RTEMS_NO_ASR | \
33 RTEMS_INTERRUPT_LEVEL(0))
35 #include <bsp.h>
37 char *rtems_progname;
39 #define CONFIGURE_INIT
41 rtems_task Init (rtems_task_argument argument);
43 #include <confdefs.h>
45 #include <stdio.h>
47 #if !defined (ACE_LACKS_NETWORKING)
49 #include <rtems/rtems_bsdnet.h>
52 * Network configuration
54 ************************************************************
55 * EDIT THIS FILE TO REFLECT YOUR NETWORK CONFIGURATION *
56 * BEFORE RUNNING ANY RTEMS PROGRAMS WHICH USE THE NETWORK! *
57 ************************************************************
60 #ifndef _RTEMS_NETWORKCONFIG_H_
61 #define _RTEMS_NETWORKCONFIG_H_
63 #ifndef RTEMS_BSP_NETWORK_DRIVER_NAME
64 #warning "RTEMS_BSP_NETWORK_DRIVER_NAME is not defined"
65 #define RTEMS_BSP_NETWORK_DRIVER_NAME "no_network1"
66 #endif
68 #ifndef RTEMS_BSP_NETWORK_DRIVER_ATTACH
69 #warning "RTEMS_BSP_NETWORK_DRIVER_ATTACH is not defined"
70 #define RTEMS_BSP_NETWORK_DRIVER_ATTACH 0
71 #endif
73 /* #define RTEMS_USE_BOOTP */
75 #include <bsp.h>
78 * Define RTEMS_SET_ETHERNET_ADDRESS if you want to specify the
79 * Ethernet address here. If RTEMS_SET_ETHERNET_ADDRESS is not
80 * defined the driver will choose an address.
82 #define RTEMS_SET_ETHERNET_ADDRESS
83 #if (defined (RTEMS_SET_ETHERNET_ADDRESS))
84 static char ethernet_address[6] = { 0x00, 0x80, 0x7F, 0x22, 0x61, 0x77 };
86 #endif
88 #define RTEMS_USE_LOOPBACK
90 #ifdef RTEMS_USE_LOOPBACK
92 * Loopback interface
94 int rtems_bsdnet_loopattach(struct rtems_bsdnet_ifconfig *, int);
96 #ifdef RTEMS_USE_LOOPBACK_ONLY
97 static struct rtems_bsdnet_ifconfig netdriver_config = {
98 #else
99 static struct rtems_bsdnet_ifconfig loopback_config = {
100 #endif
101 "lo0", /* name */
102 rtems_bsdnet_loopattach, /* attach function */
103 0, /* link to next interface */
104 "127.0.0.1", /* IP address */
105 "255.0.0.0", /* IP net mask */
107 #endif
110 * Default network interface
112 #ifndef RTEMS_USE_LOOPBACK_ONLY
113 static struct rtems_bsdnet_ifconfig netdriver_config = {
114 RTEMS_BSP_NETWORK_DRIVER_NAME, /* name */
115 RTEMS_BSP_NETWORK_DRIVER_ATTACH, /* attach function */
117 #ifdef RTEMS_USE_LOOPBACK
118 &loopback_config, /* link to next interface */
119 #else
120 0, /* No more interfaces */
121 #endif
123 #if (defined (RTEMS_USE_BOOTP))
124 0, /* BOOTP supplies IP address */
125 0, /* BOOTP supplies IP net mask */
126 #else
127 "XXX.YYY.ZZZ.XYZ", /* IP address */
128 "255.255.255.0", /* IP net mask */
129 #endif /* !RTEMS_USE_BOOTP */
131 #if (defined (RTEMS_SET_ETHERNET_ADDRESS))
132 ethernet_address, /* Ethernet hardware address */
133 #else
134 0, /* Driver supplies hardware address */
135 #endif
136 0 /* Use default driver parameters */
138 #endif
141 * Network configuration
143 struct rtems_bsdnet_config rtems_bsdnet_config = {
144 &netdriver_config,
146 #if (defined (RTEMS_USE_BOOTP))
147 rtems_bsdnet_do_bootp,
148 #else
150 #endif
152 0, /* Default network task priority */
153 0, /* Default mbuf capacity */
154 0, /* Default mbuf cluster capacity */
156 #if (!defined (RTEMS_USE_BOOTP))
157 "rtems_host", /* Host name */
158 "nodomain.com", /* Domain name */
159 "XXX.YYY.ZZZ.1", /* Gateway */
160 "XXX.YYY.ZZZ.1", /* Log host */
161 {"XXX.YYY.ZZZ.1" }, /* Name server(s) */
162 {"XXX.YYY.ZZZ.1" }, /* NTP server(s) */
165 * A real example -- DO NOT USE THIS YOURSELF!!!
168 #if 0
169 "dy4", /* Host name */
170 "NOT_oarcorp.com", /* Domain name */
171 "192.168.1.2", /* Gateway */
172 "192.168.1.2", /* Log host */
173 {"192.168.1.2" }, /* Name server(s) */
174 {"192.168.1.2" }, /* NTP server(s) */
175 #endif
176 #endif /* !RTEMS_USE_BOOTP */
181 * For TFTP test application
183 #if (defined (RTEMS_USE_BOOTP))
184 #define RTEMS_TFTP_TEST_HOST_NAME "BOOTP_HOST"
185 #define RTEMS_TFTP_TEST_FILE_NAME "BOOTP_FILE"
186 #else
187 #define RTEMS_TFTP_TEST_HOST_NAME "XXX.YYY.ZZZ.XYZ"
188 #define RTEMS_TFTP_TEST_FILE_NAME "tftptest"
189 #endif
191 #endif /* _RTEMS_NETWORKCONFIG_H_ */
193 #endif /* ACE_LACKS_NETWORKING */
195 extern int main (int, char *[]);
198 * RTEMS Startup Task
200 rtems_task
201 Init (rtems_task_argument not_used)
203 int retval = 0;
204 #if !defined (ACE_LACKS_NETWORKING)
205 retval = rtems_bsdnet_initialize_network ();
206 #endif /* ACE_LACKS_NETWORKING */
207 if (retval == 0)
209 retval = main (0, 0);
213 #elif !defined (__GNUC__) && !defined (__INTEL_COMPILER)
214 /* Make compilers stop complaining about an empty translation unit */
215 static int shut_up_compiler = 0;
216 #endif /* ACE_HAS_RTEMS */