fixed initializer and typos
parent
35d93d22db
commit
51fff9fa82
|
@ -76,7 +76,7 @@ pub const Mutex = switch(builtin.os) {
|
|||
pub fn init() Mutex {
|
||||
return Mutex {
|
||||
.lock = undefined,
|
||||
.init_once = undefined,
|
||||
.init_once = windows.INIT_ONCE_STATIC_INIT,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -87,7 +87,7 @@ pub const Mutex = switch(builtin.os) {
|
|||
) windows.BOOL {
|
||||
var lock = @ptrCast(
|
||||
*windows.CRITICAL_SECTION,
|
||||
@alignCast(@alignOf(*windows.CRITICAL_SECTION), ctx.?)
|
||||
@alignCast(@alignOf(*windows.CRITICAL_SECTION), Context.?)
|
||||
);
|
||||
windows.InitializeCriticalSection(lock);
|
||||
return windows.TRUE;
|
||||
|
|
|
@ -261,3 +261,7 @@ pub const PINIT_ONCE_FN = ?extern fn(InitOnce: *RTL_RUN_ONCE, Parameter: ?PVOID,
|
|||
pub const RTL_RUN_ONCE = extern struct {
|
||||
Ptr: PVOID,
|
||||
};
|
||||
|
||||
pub const INIT_ONCE_STATIC_INIT = RTL_RUN_ONCE {
|
||||
.Ptr = null,
|
||||
};
|
Loading…
Reference in New Issue