mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-08 08:38:51 +00:00
Remove the use of import within when
This commit is contained in:
Vendored
-24
@@ -276,30 +276,6 @@ thread_priority :: enum c.int {
|
||||
realtime = 1,
|
||||
default = 0,
|
||||
}
|
||||
|
||||
|
||||
when ODIN_OS == .Windows {
|
||||
thread :: distinct rawptr
|
||||
mutex :: distinct rawptr
|
||||
event :: distinct rawptr
|
||||
semaphore :: distinct rawptr
|
||||
} else {
|
||||
import "core:sys/unix"
|
||||
|
||||
thread :: unix.pthread_t
|
||||
mutex :: unix.pthread_mutex_t
|
||||
event :: struct {
|
||||
value: u32,
|
||||
lock: unix.pthread_mutex_t,
|
||||
cond: unix.pthread_cond_t,
|
||||
}
|
||||
semaphore :: struct {
|
||||
value: c.int,
|
||||
lock: unix.pthread_mutex_t,
|
||||
cond: unix.pthread_cond_t,
|
||||
}
|
||||
}
|
||||
|
||||
} /* NO_THREADING */
|
||||
|
||||
|
||||
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
//+build !windows
|
||||
package miniaudio
|
||||
|
||||
import "core:sys/unix"
|
||||
|
||||
thread :: unix.pthread_t
|
||||
mutex :: unix.pthread_mutex_t
|
||||
event :: struct {
|
||||
value: u32,
|
||||
lock: unix.pthread_mutex_t,
|
||||
cond: unix.pthread_cond_t,
|
||||
}
|
||||
semaphore :: struct {
|
||||
value: c.int,
|
||||
lock: unix.pthread_mutex_t,
|
||||
cond: unix.pthread_cond_t,
|
||||
}
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
package miniaudio
|
||||
|
||||
thread :: distinct rawptr
|
||||
mutex :: distinct rawptr
|
||||
event :: distinct rawptr
|
||||
semaphore :: distinct rawptr
|
||||
Reference in New Issue
Block a user