Remove import cycle on FreeBSD

This commit is contained in:
gingerBill
2022-07-18 15:20:28 +01:00
parent e91f8feedf
commit 9eb3da0474
4 changed files with 29 additions and 25 deletions
+8 -2
View File
@@ -2,8 +2,14 @@
//+private
package sync
import "core:os"
import "core:c"
foreign import dl "system:dl"
foreign dl {
pthread_getthreadid_np :: proc "c" () -> c.int ---
}
_current_thread_id :: proc "contextless" () -> int {
return os.current_thread_id()
return int(pthread_getthreadid_np())
}