mirror of https://github.com/RT-Thread/rt-thread
[smart] Fix parameter issue when calling the __arch_get_hw_counter function.
This commit is contained in:
parent
1c46d55ad9
commit
83f6747245
|
@ -46,7 +46,7 @@ __rt_vdso_getcoarse(struct timespec *ts, clockid_t clock, const struct vdso_data
|
|||
|
||||
do {
|
||||
seq = rt_vdso_read_begin(vd);
|
||||
cycles = __arch_get_hw_counter(vd->clock_mode, vd);
|
||||
cycles = __arch_get_hw_counter();
|
||||
if (unlikely(!rt_vdso_cycles_ready(cycles)))
|
||||
return -1;
|
||||
ns = vdso_ts->tv_nsec;
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
: "=r" (tmp) : "r" (_val)); \
|
||||
} while (0)
|
||||
|
||||
static inline uint64_t __arch_get_hw_counter()
|
||||
static inline uint64_t __arch_get_hw_counter(void)
|
||||
{
|
||||
uint64_t res;
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ __rt_vdso_getcoarse(struct timespec *ts, clockid_t clock, const struct vdso_data
|
|||
|
||||
do {
|
||||
seq = rt_vdso_read_begin(vd);
|
||||
cycles = __arch_get_hw_counter(vd->clock_mode, vd);
|
||||
cycles = __arch_get_hw_counter();
|
||||
if (unlikely(!rt_vdso_cycles_ready(cycles)))
|
||||
return -1;
|
||||
ns = vdso_ts->tv_nsec;
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#define arch_counter_enforce_ordering \
|
||||
__asm__ volatile("fence rw, rw" ::: "memory")
|
||||
|
||||
static inline uint64_t __arch_get_hw_counter()
|
||||
static inline uint64_t __arch_get_hw_counter(void)
|
||||
{
|
||||
uint64_t res;
|
||||
__asm__ volatile("rdtime %0" : "=r"(res));
|
||||
|
|
Loading…
Reference in New Issue