[smart] Fix parameter issue when calling the __arch_get_hw_counter function.

This commit is contained in:
bernard 2025-05-19 09:19:05 +08:00 committed by Rbb666
parent 1c46d55ad9
commit 83f6747245
4 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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));