2 /////////////////////////////////////////////////////////////////////////////
3 // $Header: /usr/cvs/microwin/src/rtems/rtems_init.c,v 1.1.1.1 2001/06/21 06:32:42 greg Exp $
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:
17 // $Log: rtems_init.c,v $
18 // Revision 1.1.1.1 2001/06/21 06:32:42 greg
19 // Microwindows pre8 with patches
21 // Revision 1.1.1.1 2001/06/05 03:44:03 root
22 // First import of 5/5/2001 Microwindows to CVS
25 /////////////////////////////////////////////////////////////////////////////
28 #define CONFIGURE_INIT
35 #include <sys/socket.h>
36 #include <netinet/in.h>
38 #include <arpa/inet.h>
40 #include "device.h" /* DPRINTF() macro */
42 /* Enable the following define if you want to debug this application */
43 /* #define USE_REMOTE_GDB__ */
44 #ifdef USE_REMOTE_GDB__
45 extern void init_remote_gdb( void );
46 #define BREAKPOINT() asm(" int $3");
49 /* this is the command line options to be passed to the main routine */
52 "cc_main", /* arg[ 0 ] -- always the name of the program */
54 int cc_argc = sizeof( cc_argv ) / sizeof( cc_argv[ 0 ] );
57 extern int rtems_main(int argc, char **argv);
60 * DESCRIPTION: Init task for any MicroWindows/RTEMS application.
62 void *POSIX_Init( void *argument )
66 #ifdef USE_REMOTE_GDB__
71 DPRINTF( "\nStarting RTEMS init task...\n" );
74 /* Make all network initialization */
75 rtems_bsdnet_initialize_network();
76 DPRINTF( "Netowrk Initialization is complete.\n\n" );
79 st = _Thread_Executing->Start.Initial_stack.size;
80 DPRINTF( "Init Task Stack Size is: %d\n", st );
82 rtems_main( cc_argc, cc_argv );
83 DPRINTF( "*** Done ***\n\n\n" );
85 return NULL; /* just so the compiler thinks we returned something */