From a34b6d0ca48dcd5f735725e80ceec9259e88bf73 Mon Sep 17 00:00:00 2001 From: Marius Gerbershagen Date: Tue, 18 Sep 2018 18:45:41 +0200 Subject: [PATCH] threading: proctect with-rwlock against interrupts --- src/lsp/mp.lsp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/lsp/mp.lsp b/src/lsp/mp.lsp index bfc1f16b5..34cbad63a 100644 --- a/src/lsp/mp.lsp +++ b/src/lsp/mp.lsp @@ -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))))))