Hi,
On Wed, 4 Mar 2020 16:15:20 +0100 Sebastien Marie wrote:
> Attached a patch for fixing #1638.
Thanks a lot, Sebastien. Attached is your patch, signed-off.
All the best.
Mario
--
http://parenteses.org/mario
>From 766f6a42457c2484bc4d096dc05eb1af2e70198a Mon Sep 17 00:00:00 2001
From: Sebastien Marie
Date: Wed, 4 Mar 2020 15:10:55 +
Subject: [PATCH] Fix scheduler in user-interrupt management
When processing interruption code, the thread-state-buffer should be updated to
reflect any global changes (like parameters), else changes could be lost.
Fix: #1638
Signed-off-by: Mario Domenech Goulart
---
scheduler.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/scheduler.scm b/scheduler.scm
index 18d7411e..4d5b11d0 100644
--- a/scheduler.scm
+++ b/scheduler.scm
@@ -219,7 +219,9 @@ EOF
(loop (cdr lst)) ) ) ) ) ) )
;; Unblock threads blocked by I/O:
(if eintr
- (##sys#force-primordial) ; force it to handle user-interrupt
+ (begin
+ (##sys#update-thread-state-buffer ct)
+ (##sys#force-primordial)) ; force it to handle user-interrupt
(unless (null? ##sys#fd-list)
(##sys#unblock-threads-for-i/o) ) )
;; Fetch and activate next ready thread:
--
2.11.0