interrupt: fix interruptible functions without any interrupt context
commitc1a723e0b003fd1011c36cd4df802e64b118accd
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 21 Dec 2015 18:53:55 +0000 (21 20:53 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 21 Dec 2015 18:55:44 +0000 (21 20:55 +0200)
tree60550cbd4dbc8d5cf51831775c574b63affe4bba
parent4a9086ff38516208a966578ff8fe3fa703165010
interrupt: fix interruptible functions without any interrupt context

If there are no interrupt contexts in the whole process, then the
thread variable is uninitialized. This adds a check.

Using thread_local would be much simpler and faster (but C11 threads).
src/misc/interrupt.c