(Merge 3.1) Issue #12060: Use sig_atomic_t type and volatile keyword in the

signal module. Patch written by Charles-François Natali.
This commit is contained in:
Victor Stinner 2011-05-15 10:27:09 +02:00
commit 5ebfe6d9a9
2 changed files with 6 additions and 3 deletions

View file

@ -80,12 +80,12 @@ static long main_thread;
static pid_t main_pid;
#endif
static struct {
int tripped;
static volatile struct {
sig_atomic_t tripped;
PyObject *func;
} Handlers[NSIG];
static sig_atomic_t wakeup_fd = -1;
static volatile sig_atomic_t wakeup_fd = -1;
/* Speed up sigcheck() when none tripped */
static volatile sig_atomic_t is_tripped = 0;