blob: baf79ad3f1e19bad228147fee51d48e740fb277f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
/* Copyright (c) 2018, Linaro Limited
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef ODP_ARCH_TIME_CPU_H_
#define ODP_ARCH_TIME_CPU_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include <odp/api/abi/cpu_rdtsc.h>
static inline uint64_t _odp_time_cpu_global(void)
{
return _odp_cpu_rdtsc();
}
static inline uint64_t _odp_time_cpu_global_strict(void)
{
__atomic_thread_fence(__ATOMIC_SEQ_CST);
return _odp_cpu_rdtsc();
}
int _odp_time_cpu_global_freq_is_const(void);
uint64_t _odp_time_cpu_global_freq(void);
#ifdef __cplusplus
}
#endif
#endif
|