source: rtems/testsuites/psxtmtests/psxtmthread01/init.c @ e313551

4.11
Last change on this file since e313551 was e313551, checked in by Ralf Corsepius <ralf.corsepius@…>, on Feb 22, 2011 at 10:58:44 AM

Add HAVE_CONFIG_H.

  • Property mode set to 100644
File size: 1.3 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2010.
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#ifdef HAVE_CONFIG_H
13#include "config.h"
14#endif
15
16#include <coverhd.h>
17#include <tmacros.h>
18#include <timesys.h>
19#include "test_support.h"
20
21#include <pthread.h>
22
23pthread_t ThreadId;
24
25void *TestThread(
26  void *argument
27)
28{
29  return NULL;
30}
31
32
33void benchmark_pthread_create(
34  int    iteration,
35  void  *argument
36)
37{
38  int status;
39
40  status = pthread_create( &ThreadId, NULL, TestThread, NULL );
41  rtems_test_assert( !status );
42}
43
44void *POSIX_Init(
45  void *argument
46)
47{
48  puts( "\n\n*** POSIX TIME TEST THREAD 01 ***" );
49
50  rtems_time_test_measure_operation(
51    "pthread_create",
52    benchmark_pthread_create,
53    NULL,
54    1,
55    0
56  );
57
58 
59  puts( "*** END OF POSIX TIME TEST THREAD 01 ***" );
60
61  rtems_test_exit(0);
62}
63
64/* configuration information */
65
66#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
67#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
68
69#define CONFIGURE_MAXIMUM_POSIX_THREADS     OPERATION_COUNT + 2
70#define CONFIGURE_POSIX_INIT_THREAD_TABLE
71
72#define CONFIGURE_INIT
73
74#include <rtems/confdefs.h>
75/* end of file */
Note: See TracBrowser for help on using the repository browser.