mirror of
https://github.com/ziglang/zig.git
synced 2024-12-03 10:28:48 +00:00
spinlock: Default SpinLock.state to .Unlocked to allow default struct initialization
std.Mutex, which is struct initialized, is possibly defined to be std.SpinLock.
This commit is contained in:
parent
50af87a9e3
commit
148c887ace
@ -7,7 +7,7 @@ const std = @import("std.zig");
|
||||
const builtin = @import("builtin");
|
||||
|
||||
pub const SpinLock = struct {
|
||||
state: State,
|
||||
state: State = .Unlocked,
|
||||
|
||||
const State = enum(u8) {
|
||||
Unlocked,
|
||||
|
Loading…
Reference in New Issue
Block a user