1 | /* Task_4 |
---|
2 | * |
---|
3 | * This routine serves as a test task. Its only purpose in life is to |
---|
4 | * generate the error where a rate monotonic period is accessed by a |
---|
5 | * task other than its creator. |
---|
6 | * |
---|
7 | * Input parameters: |
---|
8 | * argument - task argument |
---|
9 | * |
---|
10 | * Output parameters: NONE |
---|
11 | * |
---|
12 | * COPYRIGHT (c) 1989-1999. |
---|
13 | * On-Line Applications Research Corporation (OAR). |
---|
14 | * |
---|
15 | * The license and distribution terms for this file may be |
---|
16 | * found in the file LICENSE in this distribution or at |
---|
17 | * http://www.rtems.com/license/LICENSE. |
---|
18 | */ |
---|
19 | |
---|
20 | #ifdef HAVE_CONFIG_H |
---|
21 | #include "config.h" |
---|
22 | #endif |
---|
23 | |
---|
24 | #include "system.h" |
---|
25 | |
---|
26 | rtems_task Task_4( |
---|
27 | rtems_task_argument argument |
---|
28 | ) |
---|
29 | { |
---|
30 | rtems_status_code status; |
---|
31 | |
---|
32 | status = rtems_rate_monotonic_cancel( Period_id[ 1 ] ); |
---|
33 | fatal_directive_status( |
---|
34 | status, |
---|
35 | RTEMS_NOT_OWNER_OF_RESOURCE, |
---|
36 | "rtems_rate_monotonic_cancel not the owner" |
---|
37 | ); |
---|
38 | puts( "TA4 - rtems_rate_monotonic_cancel - RTEMS_NOT_OWNER_OF_RESOURCE" ); |
---|
39 | |
---|
40 | status = rtems_rate_monotonic_period( Period_id[ 1 ], 5 ); |
---|
41 | fatal_directive_status( |
---|
42 | status, |
---|
43 | RTEMS_NOT_OWNER_OF_RESOURCE, |
---|
44 | "rtems_rate_monotonic_period not the owner" |
---|
45 | ); |
---|
46 | puts( "TA4 - rtems_rate_monotonic_period - RTEMS_NOT_OWNER_OF_RESOURCE" ); |
---|
47 | |
---|
48 | puts( "TA4 - rtems_task_delete - delete self - RTEMS_SUCCESSFUL" ); |
---|
49 | status = rtems_task_delete( RTEMS_SELF ); |
---|
50 | directive_failed( status, "rtems_task_delete of TA4" ); |
---|
51 | } |
---|