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:
BinaryWarlock 2021-01-06 16:06:40 +02:00 committed by Andrew Kelley
parent 50af87a9e3
commit 148c887ace

View File

@ -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,