Added notes regarding mutex lock issue

This commit is contained in:
Justin Ethier 2016-01-15 23:49:08 -05:00
parent 9d3466efd1
commit 926fa1a9e1

View file

@ -29,6 +29,11 @@
(let loop () (let loop ()
;(write (list (null? *queue*) *queue*)) ;(write (list (null? *queue*) *queue*))
(define sleep? #f) (define sleep? #f)
;; 2 issues here:
;; - the mutex-lock seems to skip over cond; there is some kind of
;; control flow problem
;; - try compiling this but commenting out the Cyc_mutex_lock
;; code in the C. there is a gc_move bag tag error at runtime
(mutex-lock! *lock*)` (mutex-lock! *lock*)`
(cond (cond
((not (null? *queue*)) ((not (null? *queue*))
@ -39,7 +44,7 @@
(set! sleep? #t))) (set! sleep? #t)))
(mutex-unlock! *lock*) (mutex-unlock! *lock*)
(if sleep? (thread-sleep! 1000)) (if sleep? (thread-sleep! 1000))
; (loop) (loop)
)) ))
;(thread-start! (make-thread producer)) ;(thread-start! (make-thread producer))