From e2924848d35e206299c65469383563178de04a54 Mon Sep 17 00:00:00 2001 From: Eric Norum Date: Wed, 6 Oct 1999 16:48:51 +0000 Subject: Useful add-on libraries --- examples/avl/init.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 examples/avl/init.c (limited to 'examples/avl/init.c') diff --git a/examples/avl/init.c b/examples/avl/init.c new file mode 100644 index 0000000..eb33c84 --- /dev/null +++ b/examples/avl/init.c @@ -0,0 +1,51 @@ +/* + * Root task + * + * $Revision$ $Date$ $Author$ + */ +#include +#include +#include + +/* + *********************************************************************** + * RTEMS CONFIGURATION * + *********************************************************************** + */ +#define CONFIGURE_RTEMS_INIT_TASKS_TABLE + +#define CONFIGURE_MAXIMUM_TASKS 20 +#define CONFIGURE_MAXIMUM_SEMAPHORES 10 +#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 10 + +#define CONFIGURE_MICROSECONDS_PER_TICK 52489 + +#define CONFIGURE_INIT +#define CONFIGURE_INIT_TASK_INITIAL_MODES (RTEMS_PREEMPT | \ + RTEMS_NO_TIMESLICE | \ + RTEMS_NO_ASR | \ + RTEMS_INTERRUPT_LEVEL(0)) +#define CONFIGURE_INIT_TASK_STACK_SIZE (40*1024) +#define CONFIGURE_INIT_TASK_PRIORITY 100 +rtems_task Init (rtems_task_argument argument); + +#define CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE +rtems_driver_address_table Device_drivers[] = { + CONSOLE_DRIVER_TABLE_ENTRY, + CLOCK_DRIVER_TABLE_ENTRY, +}; + +#include + +extern int main (int argc, char **argv); + +/* + * RTEMS Startup Task + */ +rtems_task +Init (rtems_task_argument ignored) +{ + putenv ("TERM=xterm"); + main (0, NULL); + rtems_task_suspend (RTEMS_SELF); +} -- cgit v1.2.3