Detecter sigwait pour les threads POSIX (Cygwin ne l'a pas)

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5759 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Xavier Leroy 2003-07-29 15:35:12 +00:00
parent 3195a6f480
commit 608f3e8db5
2 changed files with 9 additions and 0 deletions

4
configure vendored
View File

@ -1067,6 +1067,10 @@ if ./hasgot -i pthread.h $pthread_link pthread_self; then
esac
echo "Options for linking with POSIX threads: $pthread_link"
echo "PTHREAD_LINK=$pthread_link" >> Makefile
if sh ./hasgot $pthread_link sigwait; then
echo "sigwait() found"
echo "#define HAS_SIGWAIT" >> s.h
fi
else
echo "POSIX threads not found."
fi

View File

@ -779,6 +779,7 @@ int caml_threadstatus_wait (value wrapper)
value caml_wait_signal(value sigs) /* ML */
{
#ifdef HAS_SIGWAIT
sigset_t set;
int retcode, signo;
@ -793,6 +794,10 @@ value caml_wait_signal(value sigs) /* ML */
leave_blocking_section();
caml_pthread_check(retcode, "Thread.wait_signal");
return Val_int(signo);
#else
invalid_argument("Thread.wait_signal not implemented");
return Val_int(0); /* not reached */
#endif
}
/* Error report */