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

More work on ticket #242. sem_timedwait() can only work against CLOCK_REALTIME, so the time used to construct its absolute timeout value must be acquired from CLOCK_REALTIME regardless of the clock used by Util::SystemTimeSource?.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/libieee1394/IsoHandlerManager.cpp

    r2171 r2177  
    398398    int result; 
    399399 
    400     if (Util::SystemTimeSource::clockGettime(&ts) == -1) { 
     400    // sem_timedwait() cannot be set up to use any clock rather than  
     401    // CLOCK_REALTIME.  Therefore we get the time from CLOCK_REALTIME here. 
     402    // Doing this rather than Util::SystemTimeSource::clockGettime() doesn't 
     403    // pose a problem here because the resulting time is only used with 
     404    // sem_timedwait() to implement timeout functionality. 
     405    if (clock_gettime(CLOCK_REALTIME, &ts) == -1) { 
    401406        debugError("clock_gettime failed\n"); 
    402407        return eAR_Error;