source: rtems/testsuites/psxtests/psxautoinit02/init.c @ b1274bd9

4.104.115
Last change on this file since b1274bd9 was b1274bd9, checked in by Ralf Corsepius <ralf.corsepius@…>, on 11/30/09 at 03:33:25

Whitespace removal.

  • Property mode set to 100644
File size: 1.5 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 *  $Id$
10 */
11
12#include "tmacros.h"
13#include <pthread.h>
14#include <errno.h>
15
16void *POSIX_Init(
17  void *argument
18)
19{
20  int            sc;
21  pthread_cond_t cond1;
22  pthread_cond_t cond2;
23
24  puts( "\n\n*** POSIX TEST -- AUTOMATIC INITIALIZAITON 02 ***" );
25
26  cond1 = PTHREAD_COND_INITIALIZER;
27  cond2 = PTHREAD_COND_INITIALIZER;
28  puts( "Init - pthread_cond_broadcast - auto initialize - OK" );
29  sc = pthread_cond_broadcast( &cond1 );
30  fatal_posix_service_status( sc, 0, "cond broadcast OK" );
31
32  puts( "Init - pthread_cond_broadcast - auto initialize - EINVAL" );
33  sc = pthread_cond_broadcast( &cond2 );
34  fatal_posix_service_status( sc, EINVAL, "cond lock EINVAL" );
35
36  puts( "Init - pthread_cond_destroy - OK" );
37  sc = pthread_cond_destroy( &cond1 );
38  fatal_posix_service_status( sc, 0, "cond destroy OK" );
39
40  puts( "*** END OF POSIX TEST AUTOMATIC INITIALIZATION 02 ***" );
41  rtems_test_exit( 0 );
42
43  return NULL; /* just so the compiler thinks we returned something */
44}
45
46#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
47#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
48
49#define CONFIGURE_MAXIMUM_POSIX_THREADS 1
50#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 1
51
52#define CONFIGURE_POSIX_INIT_THREAD_TABLE
53
54#define CONFIGURE_INIT
55#include <rtems/confdefs.h>
Note: See TracBrowser for help on using the repository browser.