Microkernel thing OS experiment (Zig ⚡)
1# spinlock 2A simple spinlock in zig, with the same API as [std.Thread.Mutex](https://ziglang.org/documentation/master/std/#std.Thread.Mutex). 3Use this only if you NEED a spinlock, use a proper mutex with OS blessings otherwise. 4 5## Usage 6First, add the package to your build.zig.zon: 7`zig fetch --save git+https://github.com/frostium-project/spinlock#dev` 8Then, add the following to your build.zig: 9```zig 10const spinlock = b.dependency("spinlock", .{ 11 .target = target, 12 .optimize = optimize, 13}); 14exe.root_module.addImport("spinlock", spinlock.module("spinlock")); 15``` 16 17Now, you can import the `spinlock` module.