4.115
Last change
on this file since d6f65e40 was
d6f65e40,
checked in by Bjorn Larsson <bjornlarsson@…>, on 03/26/14 at 14:56:43
|
sptests: split sp09 screen 5,6 into spsem_err01, spsem_err02, and sptask_err01.
sp09 screen 5 split into spsem_err01, sp09 screen 6 split into
spsem_err02, and sptask_err01.
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | /* Task_2 |
---|
2 | * |
---|
3 | * This routine serves as a test task. Its only purpose is to generate the |
---|
4 | * error where a semaphore is deleted while a task is waiting for it. |
---|
5 | * |
---|
6 | * Input parameters: |
---|
7 | * argument - task argument |
---|
8 | * |
---|
9 | * Output parameters: NONE |
---|
10 | * |
---|
11 | * COPYRIGHT (c) 1989-1999. |
---|
12 | * On-Line Applications Research Corporation (OAR). |
---|
13 | * |
---|
14 | * The license and distribution terms for this file may be |
---|
15 | * found in the file LICENSE in this distribution or at |
---|
16 | * http://www.rtems.com/license/LICENSE. |
---|
17 | */ |
---|
18 | |
---|
19 | #ifdef HAVE_CONFIG_H |
---|
20 | #include "config.h" |
---|
21 | #endif |
---|
22 | |
---|
23 | #include "system.h" |
---|
24 | |
---|
25 | rtems_task Task_2( |
---|
26 | rtems_task_argument argument |
---|
27 | ) |
---|
28 | { |
---|
29 | rtems_status_code status; |
---|
30 | |
---|
31 | puts( "TA2 - rtems_semaphore_obtain - sem 1 - RTEMS_WAIT FOREVER" ); |
---|
32 | status = rtems_semaphore_obtain( |
---|
33 | Semaphore_id[ 1 ], |
---|
34 | RTEMS_DEFAULT_OPTIONS, |
---|
35 | RTEMS_NO_TIMEOUT |
---|
36 | ); |
---|
37 | fatal_directive_status( |
---|
38 | status, |
---|
39 | RTEMS_OBJECT_WAS_DELETED, |
---|
40 | "rtems_semaphore_obtain waiting to be deleted" |
---|
41 | ); |
---|
42 | puts( |
---|
43 | "TA2 - rtems_semaphore_obtain - woke up with RTEMS_OBJECT_WAS_DELETED" |
---|
44 | ); |
---|
45 | |
---|
46 | status = rtems_task_delete( RTEMS_SELF ); |
---|
47 | directive_failed( status, "rtems_task_delete of TA2" ); |
---|
48 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.