OSDN Git Service

Make sure the deadlines we set are interpreted in CLOCK_BOOTTIME
authorPatrick Porlan <patrick.porlan@intel.com>
Mon, 24 Nov 2014 13:40:16 +0000 (14:40 +0100)
committerPatrick Porlan <patrick.porlan@intel.com>
Mon, 24 Nov 2014 13:40:16 +0000 (14:40 +0100)
By default pthread_cond_timedwait uses the monotonic time source.

Change-Id: I22acbe17ffc11fc936f362ec37e3f42499fe16d4
Signed-off-by: Patrick Porlan <patrick.porlan@intel.com>
control.c

index 709b376..1bad130 100644 (file)
--- a/control.c
+++ b/control.c
@@ -529,7 +529,7 @@ static void start_acquisition_thread (int s)
 
        /* Create condition variable and mutex for quick thread release */
        ret = pthread_condattr_init(&thread_cond_attr[s]);
-       ret = pthread_condattr_setclock(&thread_cond_attr[s], CLOCK_MONOTONIC);
+       ret = pthread_condattr_setclock(&thread_cond_attr[s], CLOCK_BOOTTIME);
        ret = pthread_cond_init(&thread_release_cond[s], &thread_cond_attr[s]);
        ret = pthread_mutex_init(&thread_release_mutex[s], NULL);