Changes by tateu
authorjoan <joan@abyz.co.uk>
Sun, 4 Feb 2018 09:10:22 +0000 (09:10 +0000)
committerjoan <joan@abyz.co.uk>
Sun, 4 Feb 2018 09:10:22 +0000 (09:10 +0000)
pigpio.c

index 7c130e5330e184d08e2ad3b833d21f18653f974c..8328d3a12bbf1664316746d5303aff9eba7e87b5 100644 (file)
--- 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;