Changeset 2178

Show
Ignore:
Timestamp:
07/06/12 06:31:48 (8 years ago)
Author:
jwoithe
Message:

The BeBoB downloader calls pthread_cond_timedwait(), which (like sem_timedwait()) takes a timeout value in terms of CLOCK_REALTIME by default. While this can be changed to CLOCK_MONOTONIC using pthread_condattr_setclock() (but not CLOCK_MONOTONIC_RAW) there seems little point given that the time passed to pthread_cond_timedwait() isn't used for anything else. Therefore, explicitly fetch the CLOCK_REALTIME time for use with pthread_cond_timedwait().

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/bebob/bebob_dl_mgr.cpp

    r2171 r2178  
    575575    struct timespec timeout; 
    576576    int retcode; 
    577     Util::SystemTimeSource::clockGettime(&timeout); 
     577    // pthread_cond_timedwait() uses CLOCK_REALTIME to evaluate its 
     578    // timeout argument. 
     579    clock_gettime(CLOCK_REALTIME, &timeout); 
    578580    do { 
    579581        printf(".");