source: rtems/testsuites/psxtests/psxitimer/init.c @ 9b4422a2

4.115
Last change on this file since 9b4422a2 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 2.6 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2009.
3 *  On-Line Applications Research Corporation (OAR).
4 *
5 *  The license and distribution terms for this file may be
6 *  found in the file LICENSE in this distribution or at
7 *  http://www.rtems.com/license/LICENSE.
8 */
9
10#ifdef HAVE_CONFIG_H
11#include "config.h"
12#endif
13
14#include <pmacros.h>
15#include <sys/time.h>
16#include <errno.h>
17
18void *POSIX_Init(
19  void *argument
20)
21{
22  int              status;
23  struct itimerval itimer;
24  struct itimerval otimer;
25
26  puts( "\n\n*** POSIX TEST ITIMER ***" );
27
28  /* test getitimer stub */
29  puts( "getitimer -- bad which - EINVAL " );
30  status = getitimer( 1234, &itimer );
31  rtems_test_assert( status == -1 && errno == EINVAL );
32
33  puts( "getitimer -- NULL pointer - EFAULT " );
34  status = getitimer( ITIMER_REAL, NULL );
35  rtems_test_assert( status == -1 && errno == EFAULT );
36
37  puts( "getitimer -- ITIMER_REAL - ENOSYS " );
38  status = getitimer( ITIMER_REAL, &itimer );
39  rtems_test_assert( status == -1 && errno == ENOSYS );
40
41  puts( "getitimer -- ITIMER_VIRTUAL - ENOSYS " );
42  status = getitimer( ITIMER_VIRTUAL, &itimer );
43  rtems_test_assert( status == -1 && errno == ENOSYS );
44
45  puts( "getitimer -- ITIMER_PROF - ENOSYS " );
46  status = getitimer( ITIMER_PROF, &itimer );
47  rtems_test_assert( status == -1 && errno == ENOSYS );
48
49  /* test setitimer stub */
50  puts( "setitimer -- bad which - EINVAL " );
51  status = setitimer( 1234, &itimer, &otimer );
52  rtems_test_assert( status == -1 && errno == EINVAL );
53
54  puts( "setitimer -- NULL value pointer - EFAULT " );
55  status = setitimer( ITIMER_REAL, NULL, &otimer );
56  rtems_test_assert( status == -1 && errno == EFAULT );
57
58  puts( "setitimer -- NULL value pointer - EFAULT " );
59  status = setitimer( ITIMER_REAL, &itimer, NULL );
60  rtems_test_assert( status == -1 && errno == EFAULT );
61
62  puts( "setitimer -- ITIMER_REAL - ENOSYS " );
63  status = setitimer( ITIMER_REAL, &itimer, &otimer );
64  rtems_test_assert( status == -1 && errno == ENOSYS );
65
66  puts( "setitimer -- ITIMER_VIRTUAL - ENOSYS " );
67  status = setitimer( ITIMER_VIRTUAL, &itimer, &otimer );
68  rtems_test_assert( status == -1 && errno == ENOSYS );
69
70  puts( "setitimer -- ITIMER_PROF - ENOSYS " );
71  status = setitimer( ITIMER_PROF, &itimer, &otimer );
72  rtems_test_assert( status == -1 && errno == ENOSYS );
73
74  puts( "*** END OF POSIX TEST ITIMER ***" );
75  rtems_test_exit(0);
76}
77
78/* configuration information */
79
80#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
81#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
82
83#define CONFIGURE_MAXIMUM_POSIX_THREADS     1
84
85#define CONFIGURE_POSIX_INIT_THREAD_TABLE
86
87#define CONFIGURE_INIT
88#include <rtems/confdefs.h>
Note: See TracBrowser for help on using the repository browser.