On Sun, 20 Aug 2006 18:37:30 +0200, "Jan D." <address@hidden> said:
I needed a variable that was only set when the signal handler is
running.
I've got no response from you to my last message (*1) in the related
thread. So I'm not sure if you are for or against my suggestion about
undoing `in_sighandler'-related changes and just changing the order of
lock/unlock and BLOCK_INPUT/UNBLOCK_INPUT in the previous version of
BLOCK_INPUT_ALLOC/UNBLOCK_INPUT_ALLOC as follows.
#define BLOCK_INPUT_ALLOC \
do \
{ \
if (pthread_self () == main_thread) \
BLOCK_INPUT; \
pthread_mutex_lock (&alloc_mutex); \
} \
while (0)
#define UNBLOCK_INPUT_ALLOC \
do \
{ \
pthread_mutex_unlock (&alloc_mutex); \
if (pthread_self () == main_thread) \
UNBLOCK_INPUT; \
} \
while (0)