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

use better heuristic for compile-time cache line size

This commit is contained in:
Steffen Vogel 2018-12-02 02:49:18 +01:00
parent 6c279280f7
commit 2cadb5a98f
2 changed files with 8 additions and 3 deletions

View file

@ -57,3 +57,10 @@
/** Width of log output in characters */
#define LOG_WIDTH 80
#define LOG_HEIGHT 25
/* Hard-coded cache line size */
#if defined(__x86_64__) || defined(__i386__) || defined(__arm__)
#define CACHELINE_SIZE 64
#else
#error "Unsupported architecture"
#endif

View file

@ -52,10 +52,8 @@ int kernel_get_cacheline_size()
pclose(fp);
return ret == 1 ? size : -1;
#elif defined(__x86_64__) || defined(__i386__)
return 64; /** @todo fixme */
#else
#error "Unsupported architecture"
return CACHELINE_SIZE;
#endif
}