mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
Split userland/arch/<arch>/c/ into inline_asm and intrinsics, and move programs that don't match either up.
15 lines
265 B
C
15 lines
265 B
C
/* https://github.com/cirosantilli/linux-kernel-module-cheat#rdtsc */
|
|
|
|
#include <stdint.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
#include <x86intrin.h>
|
|
|
|
int main(void) {
|
|
uintmax_t val;
|
|
val = __rdtsc();
|
|
printf("%ju\n", val);
|
|
return EXIT_SUCCESS;
|
|
}
|