First commit, Vystem v0.1

This commit is contained in:
2026-03-31 22:15:00 +02:00
commit e15daed8c0
462 changed files with 134655 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
// SPDX-License-Identifier: MPL-2.0
#ifndef SH_LIB_TSC_H
#define SH_LIB_TSC_H
#include "std/type.h"
#include "std/status.h"
#include "cpu/asm.h"
typedef sh_uint64 sh_tsc_TSC_VALUE;
// Reas TSC register.
static inline sh_tsc_TSC_VALUE sh_tsc_read_tsc() {
return sh_asm_rdtsc();
}
// Init kernel start tsc. Intended for single use only.
SH_STATUS sh_tsc_init_tsc();
// Return kernel start tsc.
sh_tsc_TSC_VALUE sh_tsc_get_kernel_init_tsc();
// Return kernel current tsc.
sh_tsc_TSC_VALUE sh_tsc_get_kernel_current_tsc();
#endif