authorgravatar for emekankurumeh@outlook.comemekoi <emekankurumeh@outlook.com> 2018-11-27 17:43:59+00:00
committergravatar for emekankurumeh@outlook.comemekoi <emekankurumeh@outlook.com> 2019-01-11 09:56:36-06:00
log51fff9fa8212f514f76ef69c214e570d4ef98655
treeba1057f7c9d57bc37fc81ae85bc5a90829494180
parent35d93d22db6f1cdf20011b0db84586107513b462

fixed initializer and typos


2 files changed, 6 insertions(+), 2 deletions(-)

std/mutex.zig+2-2
...@@ -76,7 +76,7 @@ pub const Mutex = switch(builtin.os) {...@@ -76,7 +76,7 @@ pub const Mutex = switch(builtin.os) {
76 pub fn init() Mutex {76 pub fn init() Mutex {
77 return Mutex {77 return Mutex {
78 .lock = undefined,78 .lock = undefined,
79 .init_once = undefined,79 .init_once = windows.INIT_ONCE_STATIC_INIT,
80 };80 };
81 }81 }
8282
...@@ -87,7 +87,7 @@ pub const Mutex = switch(builtin.os) {...@@ -87,7 +87,7 @@ pub const Mutex = switch(builtin.os) {
87 ) windows.BOOL {87 ) windows.BOOL {
88 var lock = @ptrCast(88 var lock = @ptrCast(
89 *windows.CRITICAL_SECTION,89 *windows.CRITICAL_SECTION,
90 @alignCast(@alignOf(*windows.CRITICAL_SECTION), ctx.?)90 @alignCast(@alignOf(*windows.CRITICAL_SECTION), Context.?)
91 );91 );
92 windows.InitializeCriticalSection(lock);92 windows.InitializeCriticalSection(lock);
93 return windows.TRUE;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,3 +261,7 @@ pub const PINIT_ONCE_FN = ?extern fn(InitOnce: *RTL_RUN_ONCE, Parameter: ?PVOID,
261pub const RTL_RUN_ONCE = extern struct {261pub const RTL_RUN_ONCE = extern struct {
262 Ptr: PVOID,262 Ptr: PVOID,
263};263};
264
265pub const INIT_ONCE_STATIC_INIT = RTL_RUN_ONCE {
266 .Ptr = null,
267};
\ No newline at end of file