Generic (grouped) declarations: var, let, const, type, import, include

This commit is contained in:
Ginger Bill
2016-12-20 18:58:17 +00:00
parent 478d63424f
commit d0e1efe622
20 changed files with 763 additions and 730 deletions
+15 -12
View File
@@ -1,17 +1,20 @@
#import win32 "sys/windows.odin" when ODIN_OS == "windows";
#import "atomic.odin";
import (
win32 "sys/windows.odin" when ODIN_OS == "windows";
"atomic.odin";
)
type Semaphore struct {
handle win32.HANDLE;
}
type Mutex struct {
semaphore Semaphore;
counter i32;
owner i32;
recursion i32;
}
type (
Semaphore struct {
handle win32.HANDLE;
}
Mutex struct {
semaphore Semaphore;
counter i32;
owner i32;
recursion i32;
}
)
proc current_thread_id() -> i32 {
return win32.GetCurrentThreadId() as i32;