From d09ede3fd984ee45c3d579bd361a633c680c0fd0 Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Fri, 5 Dec 2014 11:25:03 -0700 Subject: [PATCH] smp: share: ostty.o --- README.txt | 10 +++++++++- src/microcode/ostty.c | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.txt b/README.txt index 7a1cb9211..fdbb6438f 100644 --- a/README.txt +++ b/README.txt @@ -417,7 +417,15 @@ command line. The remaining 12 belong to the 7 microcode modules and osscheme.o: ostty.o: - 00000000 b next_interrupt_char + 00000000 b next_interrupt_char __thread + + OK. Now thread-local. Set by signal handlers and used by + external-interrupt-handler. The signal handlers may race, but + only if you keep banging on the keyboard. (Don't do that. :0) + Assuming the handler runs with the INT_Character and INT_Timer + interrupts masked, the Scheme handler should stay on the + current processor and reliably read whatever the last signal + handler wrote. outf.o: 00000000 b stderr_mutex diff --git a/src/microcode/ostty.c b/src/microcode/ostty.c index 2140df817..5b57f68ff 100644 --- a/src/microcode/ostty.c +++ b/src/microcode/ostty.c @@ -28,7 +28,7 @@ USA. #include "osscheme.h" #include "prims.h" -static cc_t next_interrupt_char; +static __thread cc_t next_interrupt_char; void tty_set_next_interrupt_char (cc_t c) -- 2.25.1