From: Matt Birkholz Date: Fri, 5 Dec 2014 18:25:03 +0000 (-0700) Subject: smp: share: ostty.o X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=d09ede3fd984ee45c3d579bd361a633c680c0fd0;p=mit-scheme.git smp: share: ostty.o --- 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)