declare variables set from signal handlers as volatile
Make sure variables set from signal handlers are not cached in registers.
This commit is contained in:
parent
4e7690ebec
commit
3812ec2aa2
2 changed files with 3 additions and 2 deletions
2
client.c
2
client.c
|
@ -61,7 +61,7 @@ static ARR_Instance server_addresses;
|
||||||
|
|
||||||
static int sock_fd = -1;
|
static int sock_fd = -1;
|
||||||
|
|
||||||
static int quit = 0;
|
static volatile int quit = 0;
|
||||||
|
|
||||||
static int on_terminal = 0;
|
static int on_terminal = 0;
|
||||||
|
|
||||||
|
|
3
sched.c
3
sched.c
|
@ -111,7 +111,8 @@ static struct timespec last_class_dispatch[SCH_NumberOfClasses];
|
||||||
|
|
||||||
/* ================================================== */
|
/* ================================================== */
|
||||||
|
|
||||||
static int need_to_exit;
|
/* Flag terminating the main loop, which can be set from a signal handler */
|
||||||
|
static volatile int need_to_exit;
|
||||||
|
|
||||||
/* ================================================== */
|
/* ================================================== */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue