obtain-lock-multiple

Anthony Carrico <[email protected]>
Newsgroups gmane.lisp.scheme.scsh
Message-ID <[email protected]>
In scheme/rts/lock.scm, I think the else branch of
obtain-lock-multiple is missing a call to loop.

(define (obtain-lock-multiple . all-locks)
  (with-interrupts-inhibited
   (lambda ()
     (let loop ((locks all-locks))
       (cond
	((null? locks)
	 (for-each (lambda (lock)
		     (enqueue-thread! (lock-queue lock) (current-thread)))
		   all-locks)
	 (block))
	((lock-owner-uid (car locks))
	 (loop (cdr locks)))
	(else
	 (set-lock-owner-uid! (car locks)
			      (thread-uid (current-thread)))))))))

-- 
Anthony Carrico
http://giftfile.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.