blob: fe6b11e72cdc0cbdb02ebcfcff16c37dea61953a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#+build freebsd
#+private
package sync
import "core:c"
foreign import dl "system:dl"
foreign dl {
pthread_getthreadid_np :: proc "c" () -> c.int ---
}
_current_thread_id :: proc "contextless" () -> int {
return int(pthread_getthreadid_np())
}
|