source: rtems/testsuites/sptests/sp12/task4.c

Last change on this file was c499856, checked in by Chris Johns <chrisj@…>, on Mar 20, 2014 at 9:10:47 PM

Change all references of rtems.com to rtems.org.

  • Property mode set to 100644
File size: 888 bytes
Line 
1/*  Task_4
2 *
3 *  This routine serves as a test task.  It waits forever attempting
4 *  to obtain semaphore 1.  However, it should never get the semaphore!
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.org/license/LICENSE.
17 */
18
19#ifdef HAVE_CONFIG_H
20#include "config.h"
21#endif
22
23#include "system.h"
24
25rtems_task Task_4(
26  rtems_task_argument argument
27)
28{
29  rtems_status_code status;
30
31  puts( "TA4 - rtems_semaphore_obtain - wait forever on SM1" );
32  status = rtems_semaphore_obtain(
33    Semaphore_id[ 1 ],
34    RTEMS_DEFAULT_OPTIONS,
35    RTEMS_NO_TIMEOUT
36  );
37  directive_failed( status, "rtems_semaphore_obtain on SM1" );
38}
Note: See TracBrowser for help on using the repository browser.