1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

Included rdtsc in tests/unit/queue.c

Because rdtsc_init will not be used in queue.c, __attribute__((unused))
has been added to rdtsc.h
This commit is contained in:
Dennis Potter 2018-08-09 14:23:28 +02:00
parent e467012a3b
commit 53e146b0ab
2 changed files with 10 additions and 2 deletions

View file

@ -25,6 +25,7 @@
#include <stdint.h>
#include <cpuid.h>
#include <inttypes.h>
#include <stdio.h>
@ -33,6 +34,11 @@
#include <sys/sysctl.h>
#endif
#ifndef bit_TSC
#define bit_TSC (1 << 4)
#endif
#define bit_TSC_INVARIANT (1 << 8)
#define bit_RDTSCP (1 << 27)
@ -56,7 +62,8 @@ static inline uint64_t rdtscp()
return tsc;
}
int rdtsc_init(uint64_t *freq)
static int rdtsc_init(uint64_t *freq) __attribute__((unused));
static int rdtsc_init(uint64_t *freq)
{
uint32_t eax, ebx, ecx, edx;
@ -89,7 +96,7 @@ int rdtsc_init(uint64_t *freq)
if (!f)
return -1;
ret = fscanf(f, "%d", freq);
ret = fscanf(f, "%" PRIu64, freq);
fclose(f);

View file

@ -34,6 +34,7 @@
#include <villas/utils.h>
#include <villas/queue.h>
#include <villas/memory.h>
#include <villas/rdtsc.h>
#define SIZE (1 << 10)