source: rtems/testsuites/psxtmtests/psxtmcond05/init.c @ 7f97cb3

4.115
Last change on this file since 7f97cb3 was 7f97cb3, checked in by Christopher Kerl <zargyyoyo@…>, on 01/09/13 at 19:27:57

Create POSIX Timing Test psxtmcond05

  • Property mode set to 100644
File size: 1.4 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.com/license/LICENSE.
8 */
9
10#ifdef HAVE_CONFIG_H
11#include "config.h"
12#endif
13
14#include <timesys.h>
15#include <rtems/timerdrv.h>
16#include "test_support.h"
17
18/* forward declarations to avoid warnings */
19void *POSIX_Init(void *argument);
20void benchmark_broadcast(void);
21
22pthread_cond_t CondID;
23
24void benchmark_broadcast(void)
25{
26  long end_time;
27  int  status;
28
29  benchmark_timer_initialize();
30  status = pthread_cond_broadcast(&CondID);
31  end_time = benchmark_timer_read();
32  rtems_test_assert( status == 0 );
33
34  put_time(
35    "pthread_cond_broadcast - no threads waiting",
36    end_time,
37    1,        /* Only executed once */
38    0,
39    0
40  );
41
42}
43
44void *POSIX_Init(
45  void *argument
46)
47{
48
49  puts( "\n\n*** POSIX TIME TEST PSXTMCOND05 ***" );
50
51  pthread_cond_init(&CondID, NULL);
52
53  benchmark_broadcast();
54
55  puts( "*** END OF POSIX TIME TEST PSXTMCOND05 ***" );
56  rtems_test_exit(0);
57}
58
59/* configuration information */
60
61#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
62#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
63
64#define CONFIGURE_MAXIMUM_POSIX_THREADS     1
65#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 2
66#define CONFIGURE_POSIX_INIT_THREAD_TABLE
67
68#define CONFIGURE_INIT
69
70#include <rtems/confdefs.h>
71/* end of file */
Note: See TracBrowser for help on using the repository browser.