Changeset 1002 for trunk/libffado/src
- Timestamp:
- 04/20/08 04:06:26 (16 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/src/libieee1394/CycleTimerHelper.cpp
r982 r1002 561 561 { 562 562 uint32_t retval; 563 struct compute_vars my_vars;563 struct compute_vars *my_vars; 564 564 565 565 // get pointer and copy the contents 566 566 // no locking should be needed since we have more than one 567 // of these vars available, and the copywill always be finished before567 // of these vars available, and our use will always be finished before 568 568 // m_current_shadow_idx changes since this thread's priority should 569 569 // be higher than the one of the writer thread. Even if not, we only have to ensure 570 570 // that the used dataset is consistent. We can use an older dataset if it's consistent 571 571 // since it will also provide a fairly decent extrapolation. 572 unsigned int curr_idx = m_current_shadow_idx; // NOTE: this needs ordering 573 my_vars = m_shadow_vars[curr_idx]; 574 575 int64_t time_diff = now - my_vars.usecs; 576 double y_step_in_ticks = ((double)time_diff) * my_vars.rate; 572 my_vars = m_shadow_vars + m_current_shadow_idx; 573 574 int64_t time_diff = now - my_vars->usecs; 575 double y_step_in_ticks = ((double)time_diff) * my_vars->rate; 577 576 int64_t y_step_in_ticks_int = (int64_t)y_step_in_ticks; 578 uint64_t offset_in_ticks_int = my_vars .ticks;577 uint64_t offset_in_ticks_int = my_vars->ticks; 579 578 580 579 if (y_step_in_ticks_int > 0) {