Remove the use of import within when
This commit is contained in:
1 parent
3323d5c76c
commit
9aed26a234
10 files changed
+43
-41
No files matched your search
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