X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/blobdiff_plain/8eef03acb9747a40aaf92175c49e43397b872404..ddc40c70cfce8c93b228bc28a3144da45acd6708:/rtems/gw/cangw/init.c diff --git a/rtems/gw/cangw/init.c b/rtems/gw/cangw/init.c index c8057b2..5147673 100644 --- a/rtems/gw/cangw/init.c +++ b/rtems/gw/cangw/init.c @@ -1,29 +1,7 @@ -/* Init - * - * This routine is the initialization task for this test program. - * It is called from init_exec and has the responsibility for creating - * and starting the tasks that make up the test. If the time of day - * clock is required for the test, it should also be set to a known - * value by this function. - * - * Input parameters: NONE - * - * Output parameters: NONE - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.com/license/LICENSE. - * - * $Id: init.c,v 1.12.4.1 2003/09/04 18:46:30 joel Exp $ - */ - #define CONFIGURE_INIT #include #include "system.h" -#include "app_def.h" +#include "app_def.h" #include #include #include @@ -42,15 +20,15 @@ __XSTRING(major) "." __XSTRING(minor) "." __XSTRING(patch) #define RTEMS_VER_CODE VER_CODE(__RTEMS_MAJOR__ ,__RTEMS_MINOR__ ,__RTEMS_REVISION__) - - -#define CONFIGURE_SHELL_USER_COMMANDS &shell_command_print_can_totals -#define CONFIGURE_SHELL_COMMANDS_INIT -#define CONFIGURE_SHELL_COMMANDS_ALL - -#include -#include - + + +#define CONFIGURE_SHELL_USER_COMMANDS &shell_command_print_can_totals +#define CONFIGURE_SHELL_COMMANDS_INIT +#define CONFIGURE_SHELL_COMMANDS_ALL + +#include +#include + rtems_task Init(rtems_task_argument ignored){ rtems_status_code status; @@ -64,28 +42,28 @@ rtems_task Init(rtems_task_argument ignored){ printf( "Starting application " SW_VER_ID " v " BUILD_VERSION_STRING(SW_VER_MAJOR,SW_VER_MINOR,SW_VER_PATCH) "\n" ); - - /* Inits */ -#ifdef BENCH_BUILD - start_can(0, NULL); - start_net(0, NULL); -#ifdef LOAD_BUILD - start_load(0, NULL); -#endif -#endif - -#ifndef BENCH_BUILD - rtems_shell_init( - "SHLL", /* task name */ - RTEMS_MINIMUM_STACK_SIZE * 4, /* task stack size */ - 100, /* task priority */ - "/dev/console", /* device name */ - true, /* run forever */ - false, /* wait for shell to terminate */ - NULL /* login check function, use NULL to disable a login check */ - ); -#endif - + + /* Inits */ +#ifdef BENCH_BUILD + start_can(0, NULL); + start_net(0, NULL); +#ifdef LOAD_BUILD + start_load(0, NULL); +#endif +#endif + +#ifndef BENCH_BUILD + rtems_shell_init( + "SHLL", /* task name */ + RTEMS_MINIMUM_STACK_SIZE * 4, /* task stack size */ + 100, /* task priority */ + "/dev/console", /* device name */ + true, /* run forever */ + false, /* wait for shell to terminate */ + NULL /* login check function, use NULL to disable a login check */ + ); +#endif + status = rtems_task_delete( RTEMS_SELF ); exit( 0 );