Add gettid() for FreeBSD/OSX/Solaris

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
diff --git a/os/os-solaris.h b/os/os-solaris.h
index 681d4a6..e1627d7 100644
--- a/os/os-solaris.h
+++ b/os/os-solaris.h
@@ -119,6 +119,11 @@
 	return 0;
 }
 
+static inline int gettid(void)
+{
+	return pthread_self();
+}
+
 /*
  * Should be enough, not aware of what (if any) restrictions Solaris has
  */