mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-20 22:59:34 -05:00
Update configure with new yielding select test.
This commit is contained in:
parent
04d91569e1
commit
0f518857f0
3 changed files with 285 additions and 258 deletions
23
configure.in
23
configure.in
|
|
@ -516,30 +516,45 @@ if test $ol_with_threads = auto -o $ol_with_threads = posix ; then
|
||||||
#define NULL 0
|
#define NULL 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
int fildes[2];
|
||||||
|
|
||||||
int task(arg)
|
int task(arg)
|
||||||
int *arg;
|
int *arg;
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
|
|
||||||
tv.tv_sec=5;
|
fd_set rfds;
|
||||||
|
|
||||||
|
tv.tv_sec=10;
|
||||||
tv.tv_usec=0;
|
tv.tv_usec=0;
|
||||||
|
|
||||||
|
FD_ZERO(&rfds);
|
||||||
|
FD_SET(fildes[0], &rfds);
|
||||||
|
|
||||||
/* we're not interested in any fds */
|
/* we're not interested in any fds */
|
||||||
i = select(FD_SETSIZE, NULL, NULL, NULL, &tv);
|
i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
|
||||||
|
|
||||||
if(i < 0) {
|
if(i < 0) {
|
||||||
perror("select");
|
perror("select");
|
||||||
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
exit(1); /* if we exit here, the select blocked the whole process */
|
exit(1); /* if we exit here, the select blocked the whole process */
|
||||||
}
|
}
|
||||||
|
|
||||||
main(argc, argv)
|
int main(argc, argv)
|
||||||
int argc; char **argv;
|
int argc;
|
||||||
|
char **argv;
|
||||||
{
|
{
|
||||||
pthread_t t;
|
pthread_t t;
|
||||||
|
|
||||||
|
/* create a pipe to select */
|
||||||
|
if(pipe(&fildes[0])) {
|
||||||
|
perror("select");
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef HAVE_PTHREAD_SETCONCURRENCY
|
#ifdef HAVE_PTHREAD_SETCONCURRENCY
|
||||||
(void) pthread_setconcurrency(2);
|
(void) pthread_setconcurrency(2);
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
|
|
@ -173,9 +173,6 @@ is provided ``as is'' without express or implied warranty.
|
||||||
/* define if you have PP */
|
/* define if you have PP */
|
||||||
#undef HAVE_PP
|
#undef HAVE_PP
|
||||||
|
|
||||||
/* define if you have a preemptive POSIX Threads implementation */
|
|
||||||
#undef HAVE_PREEMPTIVE_PTHREADS
|
|
||||||
|
|
||||||
/* define if you have POSIX Threads */
|
/* define if you have POSIX Threads */
|
||||||
#undef HAVE_PTHREADS
|
#undef HAVE_PTHREADS
|
||||||
|
|
||||||
|
|
@ -209,6 +206,9 @@ is provided ``as is'' without express or implied warranty.
|
||||||
/* define if you have XTPP */
|
/* define if you have XTPP */
|
||||||
#undef HAVE_XTPP
|
#undef HAVE_XTPP
|
||||||
|
|
||||||
|
/* define this if select() implicitly yields in thread environments */
|
||||||
|
#undef HAVE_YIELDING_SELECT
|
||||||
|
|
||||||
/* define this for connectionless LDAP support */
|
/* define this for connectionless LDAP support */
|
||||||
#undef LDAP_CONNECTIONLESS
|
#undef LDAP_CONNECTIONLESS
|
||||||
|
|
||||||
|
|
@ -236,9 +236,6 @@ is provided ``as is'' without express or implied warranty.
|
||||||
/* define this if you want no thread support */
|
/* define this if you want no thread support */
|
||||||
#undef NO_THREADS
|
#undef NO_THREADS
|
||||||
|
|
||||||
/* define this if the thread package is preemptive */
|
|
||||||
#undef PREEMPTIVE_THREADS
|
|
||||||
|
|
||||||
/* define this for ACL Group support */
|
/* define this for ACL Group support */
|
||||||
#undef SLAPD_ACLGROUPS
|
#undef SLAPD_ACLGROUPS
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue