diff options
author | marius <marius@FreeBSD.org> | 2008-04-21 20:40:42 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2008-04-21 20:40:42 +0000 |
commit | a5bfbb37746ab09c126f94e954d086af39749661 (patch) | |
tree | 144b48223b2a9a21ba40cd55f6cd7515d2dfc88e /contrib/gcc | |
parent | ec8ec4bca9f76614af9ee0821d1e3b04ac459d61 (diff) | |
parent | 9e0f3cc19c9df1594c9cc36cfd8fddc83c52ad12 (diff) | |
download | FreeBSD-src-a5bfbb37746ab09c126f94e954d086af39749661.zip FreeBSD-src-a5bfbb37746ab09c126f94e954d086af39749661.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r178388,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/gcc')
-rw-r--r-- | contrib/gcc/gthr-posix.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/contrib/gcc/gthr-posix.h b/contrib/gcc/gthr-posix.h index 47d38a3..fd1ce22 100644 --- a/contrib/gcc/gthr-posix.h +++ b/contrib/gcc/gthr-posix.h @@ -152,9 +152,12 @@ __gthrw(pthread_setschedparam) it is passed so we cannot pretend that the interface is active if -pthreads is not specified. On Solaris 2.5.1, the interface is not exposed at all so we need to play the usual game with weak symbols. On Solaris 10 and up, a - working interface is always exposed. */ + working interface is always exposed. On FreeBSD 6 and later, libc also + exposes a dummy POSIX threads interface, similar to what Solaris 2.6 up + to 9 does. FreeBSD >= 700014 even provides a pthread_cancel stub in libc, + which means the alternate __gthread_active_p below cannot be used there. */ -#if defined(__sun) && defined(__svr4__) +#if defined(__FreeBSD__) || (defined(__sun) && defined(__svr4__)) static volatile int __gthread_active = -1; @@ -197,7 +200,7 @@ __gthread_active_p (void) return __gthread_active_latest_value != 0; } -#else /* not Solaris */ +#else /* neither FreeBSD nor Solaris */ static inline int __gthread_active_p (void) @@ -207,7 +210,7 @@ __gthread_active_p (void) return __gthread_active_ptr != 0; } -#endif /* Solaris */ +#endif /* FreeBSD or Solaris */ #else /* not SUPPORTS_WEAK */ |