diff options
| author | emekoi <emekankurumeh@outlook.com> | 2018-11-27 17:43:59 +0000 |
|---|---|---|
| committer | emekoi <emekankurumeh@outlook.com> | 2019-01-11 09:56:36 -0600 |
| commit | 51fff9fa8212f514f76ef69c214e570d4ef98655 (patch) | |
| tree | ba1057f7c9d57bc37fc81ae85bc5a90829494180 /std | |
| parent | 35d93d22db6f1cdf20011b0db84586107513b462 (diff) | |
| download | zig-51fff9fa8212f514f76ef69c214e570d4ef98655.tar.gz zig-51fff9fa8212f514f76ef69c214e570d4ef98655.zip | |
fixed initializer and typos
Diffstat (limited to 'std')
| -rw-r--r-- | std/mutex.zig | 4 | ||||
| -rw-r--r-- | std/os/windows/kernel32.zig | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/std/mutex.zig b/std/mutex.zig index 30b68511ea..2885a99ed7 100644 --- a/std/mutex.zig +++ b/std/mutex.zig @@ -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; diff --git a/std/os/windows/kernel32.zig b/std/os/windows/kernel32.zig index a0b23acf5d..8fd351c125 100644 --- a/std/os/windows/kernel32.zig +++ b/std/os/windows/kernel32.zig @@ -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, +};
\ No newline at end of file |
