diff options
author | Samuel Thibault <sthibault@debian.org> | 2009-10-10 19:49:42 -0700 |
---|---|---|
committer | Jamey Sharp <jamey@minilop.net> | 2009-10-10 19:49:42 -0700 |
commit | 3d1b1395786d58f34fb2b74c8bcad7c6b71a0578 (patch) | |
tree | a879e813d75617d509023cb584bf873bbffa75c9 /configure.ac | |
parent | 92a29c56c3d8c8b8fee3e35dff168bf1668ad34f (diff) |
Add additional pthread_* stubs and abort() on pthread_cond_*wait.
Here is a patch that adds only pthread_condattr_init/destroy,
pthread_cond_timedwait, pthread_exit, and makes both cond_*wait abort
instead of just returning 0.
Jamey Sharp gave rationale for cond_wait aborting:
> In hindsight, I'm concerned about the fact that we provide
> pthread_cond_wait as a stub returning 0. If it's ever called in a
> single-threaded application, that function should probably call abort().
> The real implementation would be guaranteed to hang in that
> circumstance, after all. In XCB, we need this to be available as a stub,
> but I can prove that it won't be called unless there are really multiple
> threads.
Further discussion leading to this patch was in the thread here:
http://lists.freedesktop.org/archives/xcb/2009-October/005110.html
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 74cd088..df0c322 100644 --- a/configure.ac +++ b/configure.ac @@ -31,7 +31,7 @@ fi PKG_CONFIG_LIBS= -AC_CHECK_FUNCS([pthread_self pthread_mutex_init pthread_mutex_destroy pthread_mutex_lock pthread_mutex_unlock pthread_cond_init pthread_cond_destroy pthread_cond_wait pthread_cond_signal pthread_cond_broadcast pthread_equal], +AC_CHECK_FUNCS([pthread_self pthread_mutex_init pthread_mutex_destroy pthread_mutex_lock pthread_mutex_unlock pthread_cond_init pthread_cond_destroy pthread_condattr_init pthread_condattr_destroy pthread_cond_wait pthread_cond_timedwait pthread_cond_signal pthread_cond_broadcast pthread_equal pthread_exit], [], [PKG_CONFIG_LIBS='-L${libdir} -lpthread-stubs']) AC_SUBST([PKG_CONFIG_LIBS]) AM_CONDITIONAL(BUILD_LIB, test "x$PKG_CONFIG_LIBS" != x) |