2 /////////////////////////////////////////////////////////////////////////////
5 // Copyright (c) 1999 ConnectTel, Inc. All Rights Reserved.
9 // RTEMS Init Task for a MicroWindows application that
10 // may or may not use network functionality.
12 // by: Rosimildo da Silva:
13 // rdasilva@connecttel.com
14 // http://www.connecttel.com
16 // MODIFICATION/HISTORY:
18 // Revision 1.1.9.1 2009-06-15 14:12:31 lothar
19 // unified MX27, MX25, MX37 trees
21 // Revision 1.1.1.1 2001/06/21 06:32:42 greg
22 // Microwindows pre8 with patches
24 // Revision 1.1.1.1 2001/06/05 03:44:03 root
25 // First import of 5/5/2001 Microwindows to CVS
28 /////////////////////////////////////////////////////////////////////////////
31 #define CONFIGURE_INIT
38 #include <sys/socket.h>
39 #include <netinet/in.h>
41 #include <arpa/inet.h>
43 #include "device.h" /* DPRINTF() macro */
45 /* Enable the following define if you want to debug this application */
46 /* #define USE_REMOTE_GDB__ */
47 #ifdef USE_REMOTE_GDB__
48 extern void init_remote_gdb( void );
49 #define BREAKPOINT() asm(" int $3");
52 /* this is the command line options to be passed to the main routine */
55 "cc_main", /* arg[ 0 ] -- always the name of the program */
57 int cc_argc = sizeof( cc_argv ) / sizeof( cc_argv[ 0 ] );
60 extern int rtems_main(int argc, char **argv);
63 * DESCRIPTION: Init task for any MicroWindows/RTEMS application.
65 void *POSIX_Init( void *argument )
69 #ifdef USE_REMOTE_GDB__
74 DPRINTF( "\nStarting RTEMS init task...\n" );
77 /* Make all network initialization */
78 rtems_bsdnet_initialize_network();
79 DPRINTF( "Netowrk Initialization is complete.\n\n" );
82 st = _Thread_Executing->Start.Initial_stack.size;
83 DPRINTF( "Init Task Stack Size is: %d\n", st );
85 rtems_main( cc_argc, cc_argv );
86 DPRINTF( "*** Done ***\n\n\n" );
88 return NULL; /* just so the compiler thinks we returned something */