MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ffclock_last_tick

Function ffclock_last_tick

freebsd/kern/kern_tc.c:787–806  ·  view source on GitHub ↗

* Retrieve feed-forward counter and time of last kernel tick. */

Source from the content-addressed store, hash-verified

785 * Retrieve feed-forward counter and time of last kernel tick.
786 */
787void
788ffclock_last_tick(ffcounter *ffcount, struct bintime *bt, uint32_t flags)
789{
790 struct fftimehands *ffth;
791 uint8_t gen;
792
793 /*
794 * No locking but check generation has not changed. Also need to make
795 * sure ffdelta is positive, i.e. ffcount > tick_ffcount.
796 */
797 do {
798 ffth = fftimehands;
799 gen = ffth->gen;
800 if ((flags & FFCLOCK_LERP) == FFCLOCK_LERP)
801 *bt = ffth->tick_time_lerp;
802 else
803 *bt = ffth->tick_time;
804 *ffcount = ffth->tick_ffcount;
805 } while (gen == 0 || gen != ffth->gen);
806}
807
808/*
809 * Absolute clock conversion. Low level function to convert ffcounter to

Callers 1

ffclock_abstimeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected