From: joan Date: Sun, 4 Feb 2018 09:10:22 +0000 (+0000) Subject: Changes by tateu X-Git-Tag: archive/raspbian/1.68-2+rpi1~58^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=847c0818467c3ef15bde8cf7c6f6cac979359f69;p=pigpio.git Changes by tateu --- diff --git a/pigpio.c b/pigpio.c index 7c130e5..8328d3a 100644 --- a/pigpio.c +++ b/pigpio.c @@ -6292,7 +6292,10 @@ static void * pthAlertThread(void *x) { stickInited = 1; numSamples = 0; - pthAlertRunning = PI_THREAD_RUNNING; + if (!(gpioCfg.ifFlags & PI_DISABLE_ALERT)) + { + pthAlertRunning = PI_THREAD_RUNNING; + } } } } @@ -8474,7 +8477,11 @@ int gpioInitialise(void) runState = PI_RUNNING; - while (pthAlertRunning != PI_THREAD_RUNNING) myGpioDelay(1000); + if (!(gpioCfg.ifFlags & PI_DISABLE_ALERT)) + { + while (pthAlertRunning != PI_THREAD_RUNNING) myGpioDelay(1000); + } + } return status;