diff options
author | Lee Duncan <lduncan@suse.com> | 2016-12-02 09:22:02 -0800 |
---|---|---|
committer | Lee Duncan <lduncan@suse.com> | 2016-12-02 09:22:02 -0800 |
commit | 3951c242d266689a8c856717b02b07c1fe193a31 (patch) | |
tree | dec2d1b61021a4b708818c84bc38354dfcfc2061 | |
parent | c3122e9aedc4ebb49090df86e6f53806fed6cebc (diff) | |
download | open-iscsi-3951c242d266689a8c856717b02b07c1fe193a31.tar.gz |
Make event_loop_stop volatile for safer access
As suggested by Christian Seiler:
"Only minor thing is that you might want to mark
static int event_loop_stop; (usr/event_poll.c)
to be volatile, to be on the safe side when modifying it
from within a signal handler. Probably not really required
here (the compiler is not allowed to optimize out the
access anyway, since you call non-static functions within
the loop), but it doesn't hurt either, just in case... "
-rw-r--r-- | usr/event_poll.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/event_poll.c b/usr/event_poll.c index 209ee02..ac25044 100644 --- a/usr/event_poll.c +++ b/usr/event_poll.c @@ -123,7 +123,7 @@ static int shutdown_wait_pids(void) #define POLL_ALARM 2 #define POLL_MAX 3 -static int event_loop_stop; +static volatile int event_loop_stop; static queue_task_t *shutdown_qtask; void event_loop_exit(queue_task_t *qtask) |