Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienux/blob/main/native/kernel/gpu/amd_host_shim.h # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aienux / native / kernel / gpu / amd_host_shim.h` 17 lines ยท 578 bytes Raw Blame History 1 /* native/kernel/gpu/amd_host_shim.h -- host test only (AMD_GPU_TEST_HOST). 2 * 3 * amd_gpu.h takes two x86 instructions from x86/x86.h (rdtsc and pause). The 4 * host test runs on any build machine, so it gets portable stand-ins here 5 * instead. The test sets tsc_hz to 1e9, so one "tick" is one nanosecond. */ 6 #pragma once 7 #include 8 #include 9 10 static inline uint64_t ck_rdtsc(void) 11 { 12 struct timespec ts; 13 clock_gettime(CLOCK_MONOTONIC, &ts); 14 return (uint64_t)ts.tv_sec * 1000000000ull + (uint64_t)ts.tv_nsec; 15 } 16 17 static inline void ck_pause(void) { }