[6d4e604b] | 1 | -- |
---|
| 2 | -- TMTEST / SPECIFICATION |
---|
| 3 | -- |
---|
| 4 | -- DESCRIPTION: |
---|
| 5 | -- |
---|
| 6 | -- This package is the specification for Test 3 of the RTEMS |
---|
| 7 | -- Timing Test Suite. |
---|
| 8 | -- |
---|
| 9 | -- DEPENDENCIES: |
---|
| 10 | -- |
---|
| 11 | -- |
---|
| 12 | -- |
---|
| 13 | -- COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. |
---|
| 14 | -- On-Line Applications Research Corporation (OAR). |
---|
| 15 | -- All rights assigned to U.S. Government, 1994. |
---|
| 16 | -- |
---|
| 17 | -- This material may be reproduced by or for the U.S. Government pursuant |
---|
| 18 | -- to the copyright license under the clause at DFARS 252.227-7013. This |
---|
| 19 | -- notice must appear in all copies of this file and its derivatives. |
---|
| 20 | -- |
---|
| 21 | -- tmtest.ads,v 1.3 1995/07/12 19:43:10 joel Exp |
---|
| 22 | -- |
---|
| 23 | |
---|
| 24 | with TIMER_DRIVER; |
---|
| 25 | with RTEMS; |
---|
| 26 | |
---|
| 27 | package TMTEST is |
---|
| 28 | |
---|
| 29 | -- |
---|
| 30 | -- The following is the ID of the semaphore used for timing operations. |
---|
| 31 | -- |
---|
| 32 | |
---|
| 33 | SEMAPHORE_ID : RTEMS.ID; |
---|
| 34 | |
---|
| 35 | -- |
---|
| 36 | -- The following variable is set to the execution time returned |
---|
| 37 | -- by the timer. |
---|
| 38 | -- |
---|
| 39 | |
---|
| 40 | END_TIME : RTEMS.UNSIGNED32; |
---|
| 41 | |
---|
| 42 | -- |
---|
| 43 | -- INIT |
---|
| 44 | -- |
---|
| 45 | -- DESCRIPTION: |
---|
| 46 | -- |
---|
| 47 | -- This RTEMS task initializes the application. |
---|
| 48 | -- |
---|
| 49 | |
---|
| 50 | procedure INIT ( |
---|
| 51 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
| 52 | ); |
---|
| 53 | |
---|
| 54 | -- |
---|
| 55 | -- TEST_INIT |
---|
| 56 | -- |
---|
| 57 | -- DESCRIPTION: |
---|
| 58 | -- |
---|
| 59 | -- This subprogram performs test initialization. After completion |
---|
| 60 | -- of test initialization, the timer is started and a preemptive |
---|
| 61 | -- SEMAPHORE_RELEASE is performed. |
---|
| 62 | -- |
---|
| 63 | |
---|
| 64 | procedure TEST_INIT ( |
---|
| 65 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
| 66 | ); |
---|
| 67 | |
---|
| 68 | -- |
---|
| 69 | -- MIDDLE_TASKS |
---|
| 70 | -- |
---|
| 71 | -- DESCRIPTION: |
---|
| 72 | -- |
---|
| 73 | -- This RTEMS task performs a blocking SEMAPHORE_OBTAIN. Once |
---|
| 74 | -- is obtains the semaphore unit and executes again, it performs |
---|
| 75 | -- a preemptive SEMAPHORE_RELEASE. |
---|
| 76 | -- |
---|
| 77 | |
---|
| 78 | procedure MIDDLE_TASKS ( |
---|
| 79 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
| 80 | ); |
---|
| 81 | |
---|
| 82 | -- |
---|
| 83 | -- HIGH_TASK |
---|
| 84 | -- |
---|
| 85 | -- DESCRIPTION: |
---|
| 86 | -- |
---|
| 87 | -- This RTEMS task stops the timer and reports the execution |
---|
| 88 | -- timer for a preemptive SEMAPHORE_RELEASE. |
---|
| 89 | -- |
---|
| 90 | |
---|
| 91 | procedure HIGH_TASK ( |
---|
| 92 | ARGUMENT : in RTEMS.TASK_ARGUMENT |
---|
| 93 | ); |
---|
| 94 | |
---|
| 95 | -- |
---|
| 96 | -- This is the Initialization Tasks Table for this test. |
---|
| 97 | -- |
---|
| 98 | |
---|
| 99 | INITIALIZATION_TASKS : aliased RTEMS.INITIALIZATION_TASKS_TABLE( 1 .. 1 ) := |
---|
| 100 | (1=> |
---|
| 101 | ( |
---|
| 102 | RTEMS.BUILD_NAME( 'U', 'I', '1', ' ' ), -- task name |
---|
| 103 | 2048, -- stack size |
---|
| 104 | 1, -- priority |
---|
| 105 | RTEMS.DEFAULT_ATTRIBUTES, -- attributes |
---|
| 106 | TMTEST.INIT'ACCESS, -- entry point |
---|
| 107 | RTEMS.NO_PREEMPT, -- initial mode |
---|
| 108 | 0 -- argument list |
---|
| 109 | ) |
---|
| 110 | ); |
---|
| 111 | |
---|
| 112 | -- |
---|
| 113 | -- This is the Configuration Table for this test. |
---|
| 114 | -- |
---|
| 115 | |
---|
| 116 | CONFIGURATION : aliased RTEMS.CONFIGURATION_TABLE := ( |
---|
| 117 | RTEMS.NULL_ADDRESS, -- will be replaced by BSP |
---|
| 118 | 256 * 1024, -- executive RAM size |
---|
| 119 | 111, -- maximum # tasks |
---|
| 120 | 110, -- maximum # timers |
---|
| 121 | 101, -- maximum # semaphores |
---|
| 122 | 0, -- maximum # message queues |
---|
| 123 | 0, -- maximum # messages |
---|
| 124 | 0, -- maximum # partitions |
---|
| 125 | 0, -- maximum # regions |
---|
| 126 | 0, -- maximum # dp memory areas |
---|
| 127 | 0, -- maximum # periods |
---|
| 128 | 0, -- maximum # user extensions |
---|
| 129 | RTEMS.MILLISECONDS_TO_MICROSECONDS(10), -- # us in a tick |
---|
| 130 | 0 -- # ticks in a timeslice |
---|
| 131 | ); |
---|
| 132 | |
---|
| 133 | end TMTEST; |
---|