source: rtems/testsuites/psxtests/psx04/task1.c @ 9a4eca5

5
Last change on this file since 9a4eca5 was c499856, checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47

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

  • Property mode set to 100644
File size: 882 bytes
Line 
1/*  Task_1
2 *
3 *  This routine serves as a test task.
4 *
5 *  Input parameters:
6 *    argument - task argument
7 *
8 *  Output parameters:  NONE
9 *
10 *  COPYRIGHT (c) 1989-2009.
11 *  On-Line Applications Research Corporation (OAR).
12 *
13 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
15 *  http://www.rtems.org/license/LICENSE.
16 */
17
18#ifdef HAVE_CONFIG_H
19#include "config.h"
20#endif
21
22#include "system.h"
23#include <signal.h>
24
25void *Task_1(
26  void *argument
27)
28{
29  unsigned int seconds;
30
31  printf( "Task_1: sleeping for 5 seconds\n" );
32
33  seconds = sleep( 5 );
34  printf( "Task_1: %d seconds left\n", seconds );
35  rtems_test_assert( seconds );
36
37     /* switch to Init */
38
39  printf( "Task_1: exit\n" );
40  pthread_exit( NULL );
41
42     /* switch to Init */
43
44  return NULL; /* just so the compiler thinks we returned something */
45}
Note: See TracBrowser for help on using the repository browser.