Resolve merge conflict
authorTheRaspyDev <theraspydev@gmail.com>
Fri, 19 May 2017 08:14:06 +0000 (10:14 +0200)
committerTheRaspyDev <theraspydev@gmail.com>
Fri, 19 May 2017 08:14:06 +0000 (10:14 +0200)
pigpio.c

index a4391a7ec7c01243aeb1a77d279316e5a959c8f9..81af8aff00401338a0417897813d5e6504439ddc 100644 (file)
--- a/pigpio.c
+++ b/pigpio.c
@@ -8140,10 +8140,13 @@ int initInitialise(void)
    if (pthread_attr_setstacksize(&pthAttr, STACK_SIZE))
       SOFT_ERROR(PI_INIT_FAILED, "pthread_attr_setstacksize failed (%m)");
 
-   if (pthread_create(&pthAlert, &pthAttr, pthAlertThread, &i))
-      SOFT_ERROR(PI_INIT_FAILED, "pthread_create alert failed (%m)");
+   if (!(gpioCfg.ifFlags & PI_DISABLE_ALERT))
+   {
+      if (pthread_create(&pthAlert, &pthAttr, pthAlertThread, &i))
+         SOFT_ERROR(PI_INIT_FAILED, "pthread_create alert failed (%m)");
 
-   pthAlertRunning = PI_THREAD_STARTED;
+      pthAlertRunning = PI_THREAD_STARTED;
+   }
 
    if (!(gpioCfg.ifFlags & PI_DISABLE_FIFO_IF))
    {