Mercurial > hg > CbC > CbC_gcc
comparison gcc/gthr-posix.h @ 55:77e2b8dfacca gcc-4.4.5
update it from 4.4.3 to 4.5.0
author | ryoma <e075725@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 12 Feb 2010 23:39:51 +0900 |
parents | a06113de4d67 |
children | f6334be47118 |
comparison
equal
deleted
inserted
replaced
52:c156f1bd5cd9 | 55:77e2b8dfacca |
---|---|
49 typedef pthread_cond_t __gthread_cond_t; | 49 typedef pthread_cond_t __gthread_cond_t; |
50 typedef struct timespec __gthread_time_t; | 50 typedef struct timespec __gthread_time_t; |
51 | 51 |
52 /* POSIX like conditional variables are supported. Please look at comments | 52 /* POSIX like conditional variables are supported. Please look at comments |
53 in gthr.h for details. */ | 53 in gthr.h for details. */ |
54 #define __GTHREAD_HAS_COND 1 | 54 #define __GTHREAD_HAS_COND 1 |
55 | 55 |
56 #define __GTHREAD_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER | 56 #define __GTHREAD_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER |
57 #define __GTHREAD_ONCE_INIT PTHREAD_ONCE_INIT | 57 #define __GTHREAD_ONCE_INIT PTHREAD_ONCE_INIT |
58 #if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER) | 58 #if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER) |
59 #define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER | 59 #define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER |
235 #else /* neither FreeBSD nor Solaris */ | 235 #else /* neither FreeBSD nor Solaris */ |
236 | 236 |
237 static inline int | 237 static inline int |
238 __gthread_active_p (void) | 238 __gthread_active_p (void) |
239 { | 239 { |
240 static void *const __gthread_active_ptr | 240 static void *const __gthread_active_ptr |
241 = __extension__ (void *) &__gthrw_(pthread_cancel); | 241 = __extension__ (void *) &__gthrw_(pthread_cancel); |
242 return __gthread_active_ptr != 0; | 242 return __gthread_active_ptr != 0; |
243 } | 243 } |
244 | 244 |
245 #endif /* FreeBSD or Solaris */ | 245 #endif /* FreeBSD or Solaris */ |