aboutsummaryrefslogtreecommitdiff
path: root/core/thread/thread.odin
diff options
context:
space:
mode:
authorLaytan Laats <laytanlaats@hotmail.com>2024-06-29 23:09:49 +0200
committerLaytan Laats <laytanlaats@hotmail.com>2024-06-29 23:15:31 +0200
commit604551eb2d106d64eb9159bc17aa5c57bbca0ca4 (patch)
tree27ca9e57f7091af156f86f01311928567d01e4a9 /core/thread/thread.odin
parent476d0087c8d47102c23cf6de71eb4014b9a7b6b2 (diff)
wasi: make the demo run on wasi and run it in CI
Diffstat (limited to 'core/thread/thread.odin')
-rw-r--r--core/thread/thread.odin6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/thread/thread.odin b/core/thread/thread.odin
index 55f73d106..80e60d6cf 100644
--- a/core/thread/thread.odin
+++ b/core/thread/thread.odin
@@ -6,6 +6,8 @@ import "base:intrinsics"
_ :: intrinsics
+IS_SUPPORTED :: _IS_SUPPORTED
+
Thread_Proc :: #type proc(^Thread)
MAX_USER_ARGUMENTS :: 8
@@ -58,7 +60,9 @@ Thread :: struct {
creation_allocator: mem.Allocator,
}
-#assert(size_of(Thread{}.user_index) == size_of(uintptr))
+when IS_SUPPORTED {
+ #assert(size_of(Thread{}.user_index) == size_of(uintptr))
+}
Thread_Priority :: enum {
Normal,