diff -r 3d813570a5e3 -r f16def8472ba thermferm/thermferm.c --- a/thermferm/thermferm.c Thu Jul 31 22:15:22 2014 +0200 +++ b/thermferm/thermferm.c Thu Jul 31 23:39:11 2014 +0200 @@ -52,7 +52,7 @@ #endif int lcdupdate; #ifndef HAVE_WIRINGPI_H -pthread_t threads[3]; +pthread_t threads[4]; #endif extern const char UNITMODE[5][8]; @@ -255,6 +255,20 @@ } #ifdef HAVE_WIRINGPI_H + rc = piThreadCreate(my_devices_loop); +#else + rc = pthread_create(&threads[t], NULL, my_devices_loop, (void *)t ); +#endif + if (rc) { + fprintf(stderr, "my_devices_loop thread didn't start rc=%d\n", rc); + syslog(LOG_NOTICE, "my_devices_loop thread didn't start rc=%d", rc); +#ifndef HAVE_WIRINGPI_H + } else { + t++; +#endif + } + +#ifdef HAVE_WIRINGPI_H rc = piThreadCreate(my_sensors_loop); #else rc = pthread_create(&threads[t], NULL, my_sensors_loop, (void *)t );