Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
timecompare.c File Reference
#include <linux/timecompare.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/math64.h>
#include <linux/kernel.h>

Go to the source code of this file.

Macros

#define TIMECOMPARE_SKEW_RESOLUTION   (((s64)1)<<30)
 
#define TIMECOMPARE_NEW_SKEW_PER_16   12
 

Functions

ktime_t timecompare_transform (struct timecompare *sync, u64 source_tstamp)
 
 EXPORT_SYMBOL_GPL (timecompare_transform)
 
int timecompare_offset (struct timecompare *sync, s64 *offset, u64 *source_tstamp)
 
 EXPORT_SYMBOL_GPL (timecompare_offset)
 
void __timecompare_update (struct timecompare *sync, u64 source_tstamp)
 
 EXPORT_SYMBOL_GPL (__timecompare_update)
 

Macro Definition Documentation

#define TIMECOMPARE_NEW_SKEW_PER_16   12
#define TIMECOMPARE_SKEW_RESOLUTION   (((s64)1)<<30)

Definition at line 32 of file timecompare.c.

Function Documentation

void __timecompare_update ( struct timecompare sync,
u64  source_tstamp 
)

Definition at line 138 of file timecompare.c.

EXPORT_SYMBOL_GPL ( timecompare_transform  )
EXPORT_SYMBOL_GPL ( timecompare_offset  )
EXPORT_SYMBOL_GPL ( __timecompare_update  )
int timecompare_offset ( struct timecompare sync,
s64 offset,
u64 source_tstamp 
)

timecompare_offset - measure current (target time - source time) offset : context for time sync : average offset during sample period returned here : average source time during sample period returned here

Returns number of samples used. Might be zero (= no result) in the unlikely case that target time was monotonically decreasing for all samples (= broken).

Definition at line 47 of file timecompare.c.

ktime_t timecompare_transform ( struct timecompare sync,
u64  source_tstamp 
)

timecompare_transform - transform source time stamp into target time base : context for time sync : the result of timecounter_read() or timecounter_cyc2time()

Definition at line 34 of file timecompare.c.