From: Cyrus H. <sl...@us...> - 2006-11-20 04:51:40
|
Update of /cvsroot/sbcl/sbcl/tests In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv23057/tests Modified Files: threads.impure.lisp Log Message: 0.9.18.62: FreeBSD threads fixes, based on the patches from NIIMI Satoshi on the sbcl-devel mailing list. This makes FreeBSD threads "work", finally, at least experimentally. * added lutex_trylock routine. * fix the sb-lutex and (not wait-p) case of get-lutex. * add pthred_mutexattr_t field to the lutex lisp object. * use libthr (1:1 threading) instead of libpthread (m:n threading) which supposedly doesn't work. * use PTHREAD_MUTEX_ERRORCHECK when attribute locking mutexes * create a dedicated cleanup thread to free threads * put a mutex around creating threads * use load_fs instead of the inline asm stubs Index: threads.impure.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/tests/threads.impure.lisp,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- threads.impure.lisp 2 Nov 2006 11:17:56 -0000 1.46 +++ threads.impure.lisp 20 Nov 2006 04:51:37 -0000 1.47 @@ -419,7 +419,9 @@ (force-output) (sb-ext:quit :unix-status 1))))))) -(let* ((nanosleep-errno (progn +;; (nanosleep -1 0) does not fail on FreeBSD +(let* (#-freebsd + (nanosleep-errno (progn (sb-unix:nanosleep -1 0) (sb-unix::get-errno))) (open-errno (progn @@ -428,6 +430,7 @@ (sb-unix::get-errno))) (threads (list + #-freebsd (exercise-syscall (lambda () (sb-unix:nanosleep -1 0)) nanosleep-errno) (exercise-syscall (lambda () (open "no-such-file" :if-does-not-exist nil)) |