| author | |
| committer | |
| log | 51fff9fa8212f514f76ef69c214e570d4ef98655 |
| tree | ba1057f7c9d57bc37fc81ae85bc5a90829494180 |
| parent | 35d93d22db6f1cdf20011b0db84586107513b462 |
2 files changed, 6 insertions(+), 2 deletions(-)
std/mutex.zig+2-2| ... | ... | @@ -76,7 +76,7 @@ pub const Mutex = switch(builtin.os) { |
| 76 | 76 | pub fn init() Mutex { |
| 77 | 77 | return Mutex { |
| 78 | 78 | .lock = undefined, |
| 79 | .init_once = undefined, | |
| 79 | .init_once = windows.INIT_ONCE_STATIC_INIT, | |
| 80 | 80 | }; |
| 81 | 81 | } |
| 82 | 82 | |
| ... | ... | @@ -87,7 +87,7 @@ pub const Mutex = switch(builtin.os) { |
| 87 | 87 | ) windows.BOOL { |
| 88 | 88 | var lock = @ptrCast( |
| 89 | 89 | *windows.CRITICAL_SECTION, |
| 90 | @alignCast(@alignOf(*windows.CRITICAL_SECTION), ctx.?) | |
| 90 | @alignCast(@alignOf(*windows.CRITICAL_SECTION), Context.?) | |
| 91 | 91 | ); |
| 92 | 92 | windows.InitializeCriticalSection(lock); |
| 93 | 93 | return windows.TRUE; |
std/os/windows/kernel32.zig+4| ... | ... | @@ -261,3 +261,7 @@ pub const PINIT_ONCE_FN = ?extern fn(InitOnce: *RTL_RUN_ONCE, Parameter: ?PVOID, |
| 261 | 261 | pub const RTL_RUN_ONCE = extern struct { |
| 262 | 262 | Ptr: PVOID, |
| 263 | 263 | }; |
| 264 | ||
| 265 | pub const INIT_ONCE_STATIC_INIT = RTL_RUN_ONCE { | |
| 266 | .Ptr = null, | |
| 267 | }; | |
| \ No newline at end of file |