OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [pthread-init-common.h] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/*
2
 * Common code for the pthread-init-*.c tests.
3
 *
4
 * Origin: Kaveh Ghazi (ghazi@caip.rutgers.edu) 9/27/2006.
5
 */
6
 
7
#define _GNU_SOURCE
8
 
9
#include <pthread.h>
10
#define UNUSED __attribute__ ((__unused__))
11
 
12
void foo(void)
13
{
14
#ifdef PTHREAD_MUTEX_INITIALIZER
15
  pthread_mutex_t pmutex UNUSED = PTHREAD_MUTEX_INITIALIZER;
16
#endif
17
#ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
18
  pthread_mutex_t pmutex_rc UNUSED = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
19
#endif
20
#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
21
  pthread_mutex_t pmutex_ec UNUSED = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;
22
#endif
23
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
24
  pthread_mutex_t pmutex_ad UNUSED = PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP;
25
#endif
26
#ifdef PTHREAD_COND_INITIALIZER
27
  pthread_cond_t pcond UNUSED = PTHREAD_COND_INITIALIZER;
28
#endif
29
#ifdef PTHREAD_RWLOCK_INITIALIZER
30
  pthread_rwlock_t prwlock UNUSED = PTHREAD_RWLOCK_INITIALIZER;
31
#endif
32
#ifdef PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP
33
  pthread_rwlock_t prwlock_nrc UNUSED
34
    = PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP;
35
#endif
36
#ifdef PTHREAD_ONCE_INIT
37
  pthread_once_t ponce UNUSED = PTHREAD_ONCE_INIT;
38
#endif
39
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.