diff options
author | rooneg <rooneg@13f79535-47bb-0310-9956-ffa450edef68> | 2006-06-30 18:14:21 +0000 |
---|---|---|
committer | rooneg <rooneg@13f79535-47bb-0310-9956-ffa450edef68> | 2006-06-30 18:14:21 +0000 |
commit | 5faca2a81fd2d3f36a394831044e61b02928c497 (patch) | |
tree | 6acb01e30fe8af5b9a9926081d1d5bd067d023d2 /configure.in | |
parent | 75074295568cf743c3da63f21ffa8e9a7e37bcaa (diff) | |
download | libapr-5faca2a81fd2d3f36a394831044e61b02928c497.tar.gz |
Implement apr_thread_yield on Unix in terms of pthread_yield or sched_yield.
Submitted by: Keisuke Nishida <keisuke.nishida gmail.com>
Reviewed by: rooneg, Henry Jen <henryjen ztune.net>
* configure.in: Look for pthread_yield and sched_yield.
* include/arch/unix/apr_arch_threadproc.h: Include sched.h if it's present.
* threadproc/unix/thread.c
(apr_thread_yield): Actually do something in here...
* CHANGES: Note change.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@418351 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/configure.in b/configure.in index 879b63d02..045e9b63f 100644 --- a/configure.in +++ b/configure.in @@ -580,7 +580,7 @@ else APR_CHECK_PTHREAD_ATTR_GETDETACHSTATE_ONE_ARG APR_CHECK_PTHREAD_RECURSIVE_MUTEX AC_CHECK_FUNCS([pthread_key_delete pthread_rwlock_init \ - pthread_attr_setguardsize]) + pthread_attr_setguardsize pthread_yield]) if test "$ac_cv_func_pthread_rwlock_init" = "yes"; then dnl ----------------------------- Checking for pthread_rwlock_t @@ -593,6 +593,12 @@ else AC_DEFINE(HAVE_PTHREAD_RWLOCKS, 1, [Define if pthread rwlocks are available]) fi fi + + if test "$ac_cv_func_pthread_yield" = "no"; then + dnl ----------------------------- Checking for sched_yield + AC_CHECK_HEADERS([sched.h]) + AC_CHECK_FUNCS([sched_yield]) + fi fi fi |