Declares the trusty TSC service declarations and functions.
Deinitializes the TSC hardware.
Function to deinitialize the TSC hardware and close a TSC session. Must be called once after the desired calls to _get_msecs have been made. Deinitialization will fail if a session is not open.
- Return values
-
OTE_SUCCESS | Indicates the operation was successful. |
OTE_ERROR_BAD_STATE | Indicates that the operation was unsuccessful (no open session exists) |
Definition at line 91 of file ote_tsc.h.
te_error_t ote_tsc_get_msecs |
( |
uint64_t * |
tsc_msecs | ) |
|
|
inline |
Gets the current value of the TSC in milliseconds.
Function to access the TSC hardware. The value returned represents the time, in milliseconds, since boot. Any number of calls to _get_msecs is allowed between initialization and deinitialization.
- Parameters
-
[out] | tsc_msecs | a pointer to a variable to store the returned TSC value (in ms). |
- Return values
-
OTE_SUCCESS | Indicates the operation was successful. |
OTE_ERROR_BAD_STATE | Indicates that the operation was unsuccessful (no open session exists) |
Definition at line 95 of file ote_tsc.h.
te_error_t ote_tsc_get_usecs |
( |
uint64_t * |
tsc_usecs | ) |
|
|
inline |
Gets the current value of the TSC in microseconds.
Function to access the TSC hardware. The value returned represents the time, in microseconds, since boot. Any number of calls to _get_usecs is allowed between initialization and deinitialization.
- Parameters
-
[out] | tsc_usecs | a pointer to a variable to store the returned TSC value (in us). |
- Return values
-
OTE_SUCCESS | Indicates the operation was successful. |
OTE_ERROR_BAD_STATE | Indicates that the operation was unsuccessful (no open session exists) |
Definition at line 99 of file ote_tsc.h.
Initializes the TSC hardware.
Function to intialize the TSC hardware and open a TSC session. Must be called once before making calls to _get_msecs. Initialization will fail if a session is already open.
- Return values
-
OTE_SUCCESS | Indicates the operation was successful. |
Definition at line 87 of file ote_tsc.h.