cleanup: add/fix comments

This commit is contained in:
Ross Kinder
2015-12-23 14:44:38 -05:00
parent 25d9ec2994
commit 064bef37e7
5 changed files with 16 additions and 6 deletions

View File

@@ -5,6 +5,9 @@ import "unsafe"
// #include <pthread.h>
import "C"
// getThreadID returns an opaque value that is unique per OS thread.
func getThreadID() uintptr {
// Darwin lacks a meaningful version of gettid() so instead we use
// ptread_self() as a proxy.
return uintptr(unsafe.Pointer(C.pthread_self()))
}