This sounds like normally only the main thread should ever be touching interrupt_input_blocked, unless we have a bug. Correct? So we need not think about how to synchronize accesses to the variable, but rather make sure that no thread except the main thread will ever run code touching it. Correct?
That is one coherent design plan. It may not be the only one. Meanwhile, operations carried out in another thread are somewhat like operations carried out in a signal handler. So in some cases it may be necessary for other threads to wait for interrupt_input_blocked to be 0 before they do their work. And unless those threads have strictly higher priority than the main thread, we have to worry about locking: how to prevent the main thread from continuing and entering code that does BLOCK_INPUT while the other thread is doing something that's supposed to be blocked by BLOCK_INPUT. _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel