mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-22 04:21:16 -08:00
threading: proctect with-rwlock against interrupts
This commit is contained in:
parent
c301009424
commit
a34b6d0ca4
1 changed files with 8 additions and 7 deletions
|
|
@ -151,10 +151,11 @@ Valid values of argument OP are :READ or :WRITE
|
|||
'mp:get-rwlock-read
|
||||
'mp:get-rwlock-write)
|
||||
,s-lock t)
|
||||
(unwind-protect
|
||||
(progn
|
||||
,@body)
|
||||
(,(if (eq :read op)
|
||||
'mp:giveup-rwlock-read
|
||||
'mp:giveup-rwlock-write)
|
||||
,s-lock)))))
|
||||
(mp:without-interrupts
|
||||
(unwind-protect
|
||||
(mp:with-restored-interrupts
|
||||
,@body)
|
||||
(,(if (eq :read op)
|
||||
'mp:giveup-rwlock-read
|
||||
'mp:giveup-rwlock-write)
|
||||
,s-lock))))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue