primitives_openbsd.odin 282 B

123456789101112131415
  1. #+build openbsd
  2. #+private
  3. package sync
  4. foreign import libc "system:c"
  5. @(default_calling_convention="c")
  6. foreign libc {
  7. @(link_name="getthrid", private="file")
  8. _unix_getthrid :: proc() -> int ---
  9. }
  10. _current_thread_id :: proc "contextless" () -> int {
  11. return _unix_getthrid()
  12. }