4.115
Rev | Line | |
---|
[a23427e] | 1 | /* Init |
---|
| 2 | * |
---|
| 3 | * This routine is the initialization task for this test program. |
---|
| 4 | * It is called from init_exec and has the responsibility for creating |
---|
| 5 | * and starting the tasks that make up the test. If the time of day |
---|
| 6 | * clock is required for the test, it should also be set to a known |
---|
| 7 | * value by this function. |
---|
| 8 | * |
---|
| 9 | * Input parameters: NONE |
---|
| 10 | * |
---|
| 11 | * Output parameters: NONE |
---|
| 12 | * |
---|
| 13 | * COPYRIGHT (c) 1989-1997. |
---|
| 14 | * On-Line Applications Research Corporation (OAR). |
---|
| 15 | * |
---|
| 16 | * The license and distribution terms for this file may in |
---|
| 17 | * the file LICENSE in this distribution or at |
---|
| 18 | * http://www.rtems.com/license/LICENSE. |
---|
| 19 | * |
---|
| 20 | * $Id$ |
---|
| 21 | */ |
---|
| 22 | |
---|
| 23 | #define CONFIGURE_INIT |
---|
| 24 | |
---|
[e313551] | 25 | #ifdef HAVE_CONFIG_H |
---|
| 26 | #include "config.h" |
---|
| 27 | #endif |
---|
| 28 | |
---|
[a23427e] | 29 | #include "system.h" |
---|
| 30 | #include <stdio.h> |
---|
| 31 | #include <stdlib.h> |
---|
| 32 | |
---|
| 33 | #include <rtems.h> |
---|
| 34 | #include <rtems/capture-cli.h> |
---|
| 35 | #include <rtems/monitor.h> |
---|
| 36 | |
---|
| 37 | volatile int can_proceed = 1; |
---|
| 38 | |
---|
| 39 | rtems_task Init( |
---|
| 40 | rtems_task_argument ignored |
---|
| 41 | ) |
---|
| 42 | { |
---|
[cdf44d93] | 43 | #if BSP_SMALL_MEMORY |
---|
| 44 | printf("NO Capture Engine. MEMORY TOO SMALL"); |
---|
| 45 | #else |
---|
[a23427e] | 46 | rtems_task_priority old_priority; |
---|
| 47 | rtems_mode old_mode; |
---|
| 48 | |
---|
| 49 | /* lower the task priority to allow created tasks to execute */ |
---|
| 50 | |
---|
| 51 | rtems_task_set_priority(RTEMS_SELF, 20, &old_priority); |
---|
| 52 | rtems_task_mode(RTEMS_PREEMPT, RTEMS_PREEMPT_MASK, &old_mode); |
---|
| 53 | |
---|
| 54 | printf( "\n*** CAPTURE ENGINE TEST ***\n" ); |
---|
| 55 | |
---|
| 56 | while (!can_proceed) |
---|
| 57 | { |
---|
| 58 | printf ("Sleeping\n"); |
---|
| 59 | usleep (1000000); |
---|
| 60 | } |
---|
| 61 | |
---|
| 62 | rtems_monitor_init (0); |
---|
| 63 | rtems_capture_cli_init (0); |
---|
[b1274bd9] | 64 | |
---|
[a23427e] | 65 | setup_tasks_to_watch (); |
---|
| 66 | |
---|
| 67 | rtems_task_delete (RTEMS_SELF); |
---|
[cdf44d93] | 68 | #endif |
---|
[a23427e] | 69 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.