Commit a34b6d0c authored by Marius Gerbershagen's avatar Marius Gerbershagen
Browse files

threading: proctect with-rwlock against interrupts

parent c3010094
...@@ -151,10 +151,11 @@ Valid values of argument OP are :READ or :WRITE ...@@ -151,10 +151,11 @@ Valid values of argument OP are :READ or :WRITE
'mp:get-rwlock-read 'mp:get-rwlock-read
'mp:get-rwlock-write) 'mp:get-rwlock-write)
,s-lock t) ,s-lock t)
(unwind-protect (mp:without-interrupts
(progn (unwind-protect
,@body) (mp:with-restored-interrupts
(,(if (eq :read op) ,@body)
'mp:giveup-rwlock-read (,(if (eq :read op)
'mp:giveup-rwlock-write) 'mp:giveup-rwlock-read
,s-lock))))) 'mp:giveup-rwlock-write)
,s-lock))))))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment