summaryrefslogtreecommitdiffhomepage
path: root/dev/misc/BenchKit
diff options
context:
space:
mode:
authorAmlal <amlal@nekernel.org>2025-08-09 20:01:15 +0200
committerAmlal <amlal@nekernel.org>2025-08-09 20:01:15 +0200
commit7ada9006860084ba5d72b517649d1b2d51e4484a (patch)
treefab8839ea2d44ac3a3187f6e043e30f512681274 /dev/misc/BenchKit
parent408be791647c015c99963cc1b6d710f58d729dec (diff)
feat: warning fixes and Semaphore API patches.
what: - The Semaphore API is being preppared for v0.0.4 Signed-off-by: Amlal <amlal@nekernel.org>
Diffstat (limited to 'dev/misc/BenchKit')
-rw-r--r--dev/misc/BenchKit/Chrono.h12
-rw-r--r--dev/misc/BenchKit/X64Chrono.h2
2 files changed, 9 insertions, 5 deletions
diff --git a/dev/misc/BenchKit/Chrono.h b/dev/misc/BenchKit/Chrono.h
index c6801de5..3a82a94e 100644
--- a/dev/misc/BenchKit/Chrono.h
+++ b/dev/misc/BenchKit/Chrono.h
@@ -24,13 +24,17 @@ class ChronoInterface {
ChronoInterface() = default;
virtual ~ChronoInterface() = default;
- NE_COPY_DEFAULT(ChronoInterface);
+ NE_COPY_DEFAULT(ChronoInterface)
- virtual void Start() = 0;
- virtual void Stop() = 0;
- virtual void Reset() = 0;
+ virtual Void Start() = 0;
+ virtual Void Stop() = 0;
+ virtual Void Reset() = 0;
virtual UInt64 GetElapsedTime() const = 0;
};
} // namespace Kernel
+namespace BenchKit {
+using namespace Kernel;
+}
+
#endif // BENCHKIT_CHRONO_H
diff --git a/dev/misc/BenchKit/X64Chrono.h b/dev/misc/BenchKit/X64Chrono.h
index 358c74d4..ac92ebb1 100644
--- a/dev/misc/BenchKit/X64Chrono.h
+++ b/dev/misc/BenchKit/X64Chrono.h
@@ -19,7 +19,7 @@ struct X64ChronoTraits {
private:
STATIC UInt64 TickImpl_(void) {
UInt64 a = 0, d = 0;
-
+
asm volatile("rdtsc" : "=a"(a), "=d"(d));
return (d << 32) | a;
}