253 fprintf(stdout, "Detected %d new devices\n", rc); |
253 fprintf(stdout, "Detected %d new devices\n", rc); |
254 wrconfig(); |
254 wrconfig(); |
255 } |
255 } |
256 |
256 |
257 #ifdef HAVE_WIRINGPI_H |
257 #ifdef HAVE_WIRINGPI_H |
|
258 rc = piThreadCreate(my_devices_loop); |
|
259 #else |
|
260 rc = pthread_create(&threads[t], NULL, my_devices_loop, (void *)t ); |
|
261 #endif |
|
262 if (rc) { |
|
263 fprintf(stderr, "my_devices_loop thread didn't start rc=%d\n", rc); |
|
264 syslog(LOG_NOTICE, "my_devices_loop thread didn't start rc=%d", rc); |
|
265 #ifndef HAVE_WIRINGPI_H |
|
266 } else { |
|
267 t++; |
|
268 #endif |
|
269 } |
|
270 |
|
271 #ifdef HAVE_WIRINGPI_H |
258 rc = piThreadCreate(my_sensors_loop); |
272 rc = piThreadCreate(my_sensors_loop); |
259 #else |
273 #else |
260 rc = pthread_create(&threads[t], NULL, my_sensors_loop, (void *)t ); |
274 rc = pthread_create(&threads[t], NULL, my_sensors_loop, (void *)t ); |
261 #endif |
275 #endif |
262 if (rc) { |
276 if (rc) { |