BSD: Add thread ID support for OpenBSD > 5.1

* Uses syscall(SYS_getthrid) which requires real thread support,
  currently only available in 5.1-current (but not 5.1-release).
  For OpenBSD <= 5.1, -1 will be returned for the thread ID.
2 files changed