Changeset 1017

Show
Ignore:
Timestamp:
04/24/08 05:19:58 (13 years ago)
Author:
ppalmers
Message:

- add false wraparound detection and notification (not corrected yet)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/libieee1394/cycletimer.h

    r962 r1017  
    316316    // we want cc_seconds to reflect the 'seconds' at the point this 
    317317    // was received 
     318     
    318319    if (rcv_cycle>cc_cycles) { 
     320        if (!(diffCycles(cc_cycles, rcv_cycle)>=0)) { 
     321            debugWarning("possibly false cycle wraparound detected: rcv: %u / cc: %u (%d)\n", 
     322                         rcv_cycle, cc_cycles, diffCycles(cc_cycles, rcv_cycle)); 
     323        } 
    319324        if (cc_seconds) { 
    320325            cc_seconds--; 
     
    402407    // we want cc_seconds to reflect the 'seconds' at the point this 
    403408    // is to be transmitted 
    404     if (xmt_cycle<cc_cycles) { 
     409    if (cc_cycles>xmt_cycle) { 
     410        if (!(diffCycles(xmt_cycle, cc_cycles)>=0)) { 
     411            debugWarning("possibly false cycle wraparound detected: cc: %u / xmt: %u (%d)\n", 
     412                         cc_cycles, xmt_cycle, diffCycles(xmt_cycle, cc_cycles)); 
     413        } 
     414 
    405415        if (cc_seconds) { 
    406416            cc_seconds--;