L4Re Operating System Framework
Interface and Usage Documentation
|
Files | |
file | rdtsc.h |
Timestamp counter related functions. | |
file | rdtsc.h |
Timestamp counter related functions. | |
Functions | |
l4_cpu_time_t | l4_rdtsc (void) |
Read current value of CPU-internal timestamp counter. | |
l4_uint32_t | l4_rdtsc_32 (void) |
Read the lest significant 32 bit of the TSC. | |
l4_uint64_t | l4_rdpmc (int ecx) |
Return current value of CPU-internal performance measurement counter. | |
l4_uint32_t | l4_rdpmc_32 (int ecx) |
Return the least significant 32 bit of a performance counter. | |
l4_uint64_t | l4_tsc_to_ns (l4_cpu_time_t tsc) |
Convert timestamp to ns value. | |
l4_uint64_t | l4_tsc_to_us (l4_cpu_time_t tsc) |
Convert timestamp into micro seconds value. | |
void | l4_tsc_to_s_and_ns (l4_cpu_time_t tsc, l4_uint32_t *s, l4_uint32_t *ns) |
Convert timestamp to s.ns value. | |
l4_cpu_time_t | l4_ns_to_tsc (l4_uint64_t ns) |
Convert nano seconds into CPU ticks. | |
void | l4_busy_wait_ns (l4_uint64_t ns) |
Wait busy for a small amount of time. | |
void | l4_busy_wait_us (l4_uint64_t us) |
Wait busy for a small amount of time. | |
l4_uint32_t | l4_calibrate_tsc (l4_kernel_info_t const *kip) |
Determine scalers for timestamp calculations. | |
l4_uint32_t | l4_tsc_init (l4_kernel_info_t const *kip) |
Initialize scaler for TSC calibrations from the kernel. | |
l4_uint32_t | l4_get_hz (void) |
Get CPU frequency in Hz. | |
|
inline |
Wait busy for a small amount of time.
ns | nano seconds to wait |
Definition at line 264 of file rdtsc.h.
References l4_ns_to_tsc(), and l4_rdtsc().
|
inline |
Wait busy for a small amount of time.
us | micro seconds to wait |
Definition at line 274 of file rdtsc.h.
References l4_ns_to_tsc(), and l4_rdtsc().
|
inline |
Determine scalers for timestamp calculations.
Determine some scalers to be able to convert between real time and CPU ticks. Just calls l4_tsc_init().
Definition at line 161 of file rdtsc.h.
References l4_tsc_init().
l4_uint32_t l4_get_hz | ( | void | ) |
Get CPU frequency in Hz.
|
inline |
Convert nano seconds into CPU ticks.
ns | nano seconds |
Definition at line 250 of file rdtsc.h.
Referenced by l4_busy_wait_ns(), and l4_busy_wait_us().
|
inline |
|
inline |
|
inline |
Read current value of CPU-internal timestamp counter.
Definition at line 167 of file rdtsc.h.
Referenced by l4_busy_wait_ns(), and l4_busy_wait_us().
|
inline |
l4_uint32_t l4_tsc_init | ( | l4_kernel_info_t const * | kip | ) |
Initialize scaler for TSC calibrations from the kernel.
Initialize the scalers needed by l4_tsc_to_ns()/l4_ns_to_tsc() and so on. Use the kernel-provided frequency.
kip | KIP pointer |
Referenced by l4_calibrate_tsc().
|
inline |
Convert timestamp to ns value.
tsc | time value in CPU ticks |
|
inline |
|
inline |