forked from Imagelibrary/rtems
kern_tc.c: Update pps_event() for uniprocessor configurations
Since pps->capgen equal to zero is not a special value in uniprocessor configurations, there is no need to check for this condition. Update #2349
This commit is contained in:
committed by
Sebastian Huber
parent
7ba1503661
commit
11621c9c52
@@ -2138,9 +2138,11 @@ pps_capture(struct pps_state *pps)
|
|||||||
pps->capffth = fftimehands;
|
pps->capffth = fftimehands;
|
||||||
#endif
|
#endif
|
||||||
pps->capcount = th->th_counter->tc_get_timecount(th->th_counter);
|
pps->capcount = th->th_counter->tc_get_timecount(th->th_counter);
|
||||||
|
#if defined(RTEMS_SMP)
|
||||||
atomic_thread_fence_acq();
|
atomic_thread_fence_acq();
|
||||||
if (pps->capgen != th->th_generation)
|
if (pps->capgen != th->th_generation)
|
||||||
pps->capgen = 0;
|
pps->capgen = 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -2165,7 +2167,11 @@ pps_event(struct pps_state *pps, int event)
|
|||||||
if ((event & pps->ppsparam.mode) == 0)
|
if ((event & pps->ppsparam.mode) == 0)
|
||||||
return;
|
return;
|
||||||
/* If the timecounter was wound up underneath us, bail out. */
|
/* If the timecounter was wound up underneath us, bail out. */
|
||||||
|
#if defined(RTEMS_SMP)
|
||||||
if (pps->capgen == 0 || pps->capgen !=
|
if (pps->capgen == 0 || pps->capgen !=
|
||||||
|
#else
|
||||||
|
if (pps->capgen !=
|
||||||
|
#endif
|
||||||
atomic_load_acq_int(&pps->capth->th_generation))
|
atomic_load_acq_int(&pps->capth->th_generation))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user