From 09177560f0c230443003fa68105ad4665aa72b6d Mon Sep 17 00:00:00 2001 From: Corey Farrell Date: Fri, 12 Feb 2016 11:55:54 -0500 Subject: [PATCH] Set shutdown_pending to volatile. This change is to allow ast_shutting_down to check the shutdown_pending value without using a lock. ASTERISK-25783 #close Change-Id: I0c45aa75e6351530308cc9c500c14eb434bb1a3f --- main/asterisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/asterisk.c b/main/asterisk.c index d99aaed..9aee49f 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -461,7 +461,7 @@ typedef enum { static shutdown_nice_t shuttingdown = NOT_SHUTTING_DOWN; /*! Prevent new channel allocation for shutdown. */ -static int shutdown_pending; +static volatile int shutdown_pending; static int restartnow; static pthread_t consolethread = AST_PTHREADT_NULL; -- 2.5.0