Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christopher Ng
OpenLDAP
Commits
82eed24c
Commit
82eed24c
authored
22 years ago
by
Howard Chu
Browse files
Options
Downloads
Patches
Plain Diff
Prefer thr_yield over sched_yield for Solaris
parent
9d2a8ba1
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
configure.in
+4
-9
4 additions, 9 deletions
configure.in
libraries/libldap_r/thr_posix.c
+4
-4
4 additions, 4 deletions
libraries/libldap_r/thr_posix.c
with
8 additions
and
13 deletions
configure.in
+
4
−
9
View file @
82eed24c
...
...
@@ -1484,11 +1484,12 @@ dnl [ol_cv_pthread_lpthread_lexc])
dnl All POSIX Thread (final) implementations should have
dnl sched_yield instead of pthread yield.
dnl check for both
AC_CHECK_FUNCS(sched_yield pthread_yield)
dnl check for both
, and thr_yield for Solaris
AC_CHECK_FUNCS(sched_yield pthread_yield
thr_yield
)
if test $ac_cv_func_sched_yield = no -a \
$ac_cv_func_pthread_yield = no ; then
$ac_cv_func_pthread_yield = no -a \
$ac_cv_func_thr_yield = no ; then
dnl Digital UNIX has sched_yield() in -lrt
AC_CHECK_LIB(rt, sched_yield,
[LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
...
...
@@ -1497,12 +1498,6 @@ dnl [ol_cv_pthread_lpthread_lexc])
ac_cv_func_sched_yield=yes],
[ac_cv_func_sched_yield=no])
fi
if test $ac_cv_func_sched_yield = no -a \
$ac_cv_func_pthread_yield = no ; then
dnl Solaris has sched_yield() stub in -lposix4
dnl but we'll use thr_yield instead.
AC_CHECK_FUNCS(thr_yield)
fi
if test $ac_cv_func_sched_yield = no -a \
$ac_cv_func_pthread_yield = no -a \
"$ac_cv_func_thr_yield" = no ; then
...
...
This diff is collapsed.
Click to expand it.
libraries/libldap_r/thr_posix.c
+
4
−
4
View file @
82eed24c
...
...
@@ -179,16 +179,16 @@ ldap_pvt_thread_kill( ldap_pvt_thread_t thread, int signo )
int
ldap_pvt_thread_yield
(
void
)
{
#if HAVE_PTHREADS == 10
#if HAVE_THR_YIELD
return
thr_yield
();
#elif HAVE_PTHREADS == 10
return
sched_yield
();
#elif defined(_POSIX_THREAD_IS_GNU_PTH)
sched_yield
();
return
0
;
#elif HAVE_THR_YIELD
return
thr_yield
();
#elif HAVE_PTHREADS == 6
pthread_yield
(
NULL
);
return
0
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment