mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-02-17 14:00:30 +08:00
Update configure with new yielding select test.
This commit is contained in:
parent
04d91569e1
commit
0f518857f0
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
|
||||
#endif
|
||||
|
||||
int fildes[2];
|
||||
|
||||
int task(arg)
|
||||
int *arg;
|
||||
{
|
||||
int i;
|
||||
struct timeval tv;
|
||||
|
||||
tv.tv_sec=5;
|
||||
fd_set rfds;
|
||||
|
||||
tv.tv_sec=10;
|
||||
tv.tv_usec=0;
|
||||
|
||||
FD_ZERO(&rfds);
|
||||
FD_SET(fildes[0], &rfds);
|
||||
|
||||
/* 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) {
|
||||
perror("select");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
exit(1); /* if we exit here, the select blocked the whole process */
|
||||
}
|
||||
|
||||
main(argc, argv)
|
||||
int argc; char **argv;
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
{
|
||||
pthread_t t;
|
||||
|
||||
/* create a pipe to select */
|
||||
if(pipe(&fildes[0])) {
|
||||
perror("select");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
#ifdef HAVE_PTHREAD_SETCONCURRENCY
|
||||
(void) pthread_setconcurrency(2);
|
||||
#else
|
||||
|
@ -173,9 +173,6 @@ is provided ``as is'' without express or implied warranty.
|
||||
/* define if you have PP */
|
||||
#undef HAVE_PP
|
||||
|
||||
/* define if you have a preemptive POSIX Threads implementation */
|
||||
#undef HAVE_PREEMPTIVE_PTHREADS
|
||||
|
||||
/* define if you have POSIX Threads */
|
||||
#undef HAVE_PTHREADS
|
||||
|
||||
@ -209,6 +206,9 @@ is provided ``as is'' without express or implied warranty.
|
||||
/* define if you have XTPP */
|
||||
#undef HAVE_XTPP
|
||||
|
||||
/* define this if select() implicitly yields in thread environments */
|
||||
#undef HAVE_YIELDING_SELECT
|
||||
|
||||
/* define this for connectionless LDAP support */
|
||||
#undef LDAP_CONNECTIONLESS
|
||||
|
||||
@ -236,9 +236,6 @@ is provided ``as is'' without express or implied warranty.
|
||||
/* define this if you want no thread support */
|
||||
#undef NO_THREADS
|
||||
|
||||
/* define this if the thread package is preemptive */
|
||||
#undef PREEMPTIVE_THREADS
|
||||
|
||||
/* define this for ACL Group support */
|
||||
#undef SLAPD_ACLGROUPS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user