Show
Ignore:
Timestamp:
07/17/12 05:57:11 (12 years ago)
Author:
jwoithe
Message:

More tweaks in the interests of ticket #242. If the monotonic and monotonic-raw clock rates differ significantly, relative sleeps using the monotonic clock will not necessarily give the sleep time expected from the rest of the system if the montonic-raw clock is in use. Therefore we'll try using just CLOCK_MONOTONIC and see how that goes. This patch also enables the ABS_TIMER sleep mode if available and selected via config.h. Note that even before it was unconditionally disabled in r2173 the ABS_TIMER functionality wasn't being used because config.h wasn't included until r2174.

Files:

Legend:

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

    r2177 r2186  
    351351        // might be available. 
    352352        if (raw1394_read_cycle_timer_and_clock != NULL) { 
    353             err = raw1394_read_cycle_timer_and_clock(m_util_handle, &cycle_timer, &local_time, CLOCK_MONOTONIC_RAW); 
    354             if (!err && Util::SystemTimeSource::setSource(CLOCK_MONOTONIC_RAW)==true) 
     353            err = raw1394_read_cycle_timer_and_clock(m_util_handle, &cycle_timer, &local_time, CLOCK_MONOTONIC); 
     354            if (!err && Util::SystemTimeSource::setSource(CLOCK_MONOTONIC)==true) 
    355355                m_have_read_ctr_and_clock = true; 
    356356        } 
     
    358358        if (m_have_read_ctr_and_clock) { 
    359359            debugOutput(DEBUG_LEVEL_VERBOSE, "This system supports the raw1394_read_cycle_timer_and_clock call and the\n"); 
    360             debugOutput(DEBUG_LEVEL_VERBOSE, "CLOCK_MONOTONIC_RAW clock source; using them.\n"); 
     360            debugOutput(DEBUG_LEVEL_VERBOSE, "CLOCK_MONOTONIC clock source; using them.\n"); 
    361361        } else { 
    362362            debugOutput(DEBUG_LEVEL_VERBOSE, "This system supports the raw1394_read_cycle_timer call, using it.\n"); 
    363             debugOutput(DEBUG_LEVEL_NORMAL, "The raw1394_read_cycle_timer_and_clock call and/or the CLOCK_MONOTONIC_RAW\n"); 
     363            debugOutput(DEBUG_LEVEL_NORMAL, "The raw1394_read_cycle_timer_and_clock call and/or the CLOCK_MONOTONIC\n"); 
    364364            debugOutput(DEBUG_LEVEL_NORMAL, "clock source is not available.\n"); 
    365365            debugOutput(DEBUG_LEVEL_NORMAL, "Fallback to raw1394_read_cycle_timer.\n");