source: network-demos/rpc_demo/init.c @ bb264e0

4.11network-demos-4-10-branchnetwork-demos-4-8-branchnetwork-demos-4-9-branch
Last change on this file since bb264e0 was bb264e0, checked in by Joel Sherrill <joel.sherrill@…>, on Jun 21, 2007 at 6:00:33 PM

2007-06-21 Joel Sherrill <joel.sherrill@…>

  • init.c: Now compiles reasonably cleanly with CVS head.
  • Property mode set to 100644
File size: 1.4 KB
Line 
1/*
2 * RTEMS configuration/initialization
3 */
4 
5#include <bsp.h>
6#include <rtems/error.h>
7#include <rtems/rtems_bsdnet.h>
8#include <stdio.h>
9#include <stdlib.h>
10
11#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
12#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20
13#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
14
15#define STACK_CHECKER_ON 1
16#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
17#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
18#define CONFIGURE_MAXIMUM_USER_EXTENSIONS   2
19#define CONFIGURE_MAXIMUM_SEMAPHORES        20
20#define CONFIGURE_MAXIMUM_TASKS             12
21
22#define CONFIGURE_MICROSECONDS_PER_TICK       20000
23
24#define CONFIGURE_INIT_TASK_PRIORITY    99
25#define CONFIGURE_INIT_TASK_STACK_SIZE  (16*1024)
26#define CONFIGURE_INIT
27
28rtems_task Init(rtems_task_argument argument);
29
30#include <rtems/confdefs.h>
31
32/*
33 * Network configuration
34 */
35#include "../networkconfig.h"
36
37#ifdef SERVER
38#define T(x)            __TXT(x)
39#define __TXT(s)        #s
40static char *av[] = {
41        "RPC client",
42        T(SERVER),
43        "Test Message",
44        NULL
45};
46#else
47static char *av[] = {
48        "RPC server",
49        NULL
50};
51#endif
52static int ac = (sizeof av / sizeof av[0]) - 1;
53
54extern int rtems_main (int argc, char **argv);
55
56rtems_task
57Init (rtems_task_argument ignored)
58{
59        rtems_bsdnet_initialize_network ();
60        rtems_bsdnet_synchronize_ntp (0, 0);
61
62        rtems_main (ac, av);
63        printf ("*** RPC Test Finish ***\n");
64        exit (0);
65}
66
67/*
68 * Dummy portmapper routines
69 */
70void pmap_set () { ; }
71void pmap_unset () { ; }
Note: See TracBrowser for help on using the repository browser.