source: rtems/testsuites/psxtests/psxcleanup01/init.c @ 698c2e50

4.115
Last change on this file since 698c2e50 was 698c2e50, checked in by Sebastian Huber <sebastian.huber@…>, on 03/25/14 at 07:06:16

tests/psxtests: Use <rtems/test.h>

  • Property mode set to 100644
File size: 1.2 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2012.
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.org/license/LICENSE.
8 */
9
10#ifdef HAVE_CONFIG_H
11#include "config.h"
12#endif
13
14#include <rtems.h>
15#include "pmacros.h"
16#include <pthread.h>  /* thread facilities */
17
18const char rtems_test_name[] = "PSXCLEANUP 1";
19
20/* forward declarations to avoid warnings */
21void *POSIX_Init(void *argument);
22void cleaner(void *arg);
23
24void cleaner(void *arg)
25{
26  puts( "clean was not supposed to run" );
27  rtems_test_exit(0);
28}
29
30void *POSIX_Init(
31  void *argument
32)
33{
34  TEST_BEGIN();
35
36  puts( "Init - pthread_cleanup_push - a routine we will not execute" );
37  pthread_cleanup_push(cleaner, NULL);
38
39  puts( "Init - pthread_cleanup_pop - do not execute" );
40  pthread_cleanup_pop(0);
41
42  TEST_END();
43  rtems_test_exit(0);
44}
45
46
47/* configuration information */
48
49#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
50#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
51
52#define CONFIGURE_POSIX_INIT_THREAD_TABLE
53
54#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
55
56#define CONFIGURE_MAXIMUM_POSIX_THREADS 1
57
58#define CONFIGURE_INIT
59#include <rtems/confdefs.h>
Note: See TracBrowser for help on using the repository browser.