MT#56374 move rtpe_shutdown to auxlib

This is a dependency of the poller and so is needed in lib/ as well to
make it usable.

Also consolidate the type.

Change-Id: I70ec8a200d6cd65710ac93636a9495cf24c35ef4
pull/1694/head
Richard Fuchs 2 years ago
parent ba7620d214
commit 84f4467241

@ -47,7 +47,6 @@ static cond_t threads_cond = COND_STATIC_INIT;
static mutex_t thread_wakers_lock = MUTEX_STATIC_INIT;
static GList *thread_wakers;
volatile int rtpe_shutdown;
#ifdef NEED_ATOMIC64_MUTEX
mutex_t __atomic64_mutex = MUTEX_STATIC_INIT;

@ -131,7 +131,7 @@ static void sighandler(gpointer x) {
}
if (ret == SIGINT || ret == SIGTERM)
rtpe_shutdown = 1;
rtpe_shutdown = true;
else if (ret == SIGUSR1) {
for (unsigned int i = 0; i < num_log_levels; i++) {
g_atomic_int_add(&rtpe_config.common.log_levels[i], -1);

@ -51,13 +51,6 @@ G_STATIC_ASSERT (sizeof *(atomic) == sizeof (gint)); \
/*** GLOBALS ***/
extern volatile int rtpe_shutdown;
/*** PROTOTYPES ***/
typedef int (*parse_func)(char **, void **, void *);

@ -22,6 +22,7 @@ struct thread_buf {
static int version;
struct rtpengine_common_config *rtpe_common_config_ptr;
__thread struct timeval rtpe_now;
volatile bool rtpe_shutdown;
static __thread struct thread_buf t_bufs[NUM_THREAD_BUFS];
static __thread int t_buf_idx;

@ -41,7 +41,7 @@ extern struct rtpengine_common_config *rtpe_common_config_ptr;
/*** GLOBALS ***/
extern __thread struct timeval rtpe_now;
extern volatile int rtpe_shutdown;
extern volatile bool rtpe_shutdown;

@ -16,6 +16,7 @@
#include "obj.h"
#include "log_funcs.h"
#include "auxlib.h"

Loading…
Cancel
Save