| Index: base/logging.cc
|
| ===================================================================
|
| --- base/logging.cc (revision 25977)
|
| +++ base/logging.cc (working copy)
|
| @@ -13,7 +13,7 @@
|
| #include <mach/mach.h>
|
| #include <mach/mach_time.h>
|
| #include <mach-o/dyld.h>
|
| -#elif defined(OS_LINUX)
|
| +#elif defined(OS_LINUX) || defined(OS_FREEBSD)
|
| #include <sys/syscall.h>
|
| #include <time.h>
|
| #endif
|
| @@ -125,6 +125,9 @@
|
| return mach_thread_self();
|
| #elif defined(OS_LINUX)
|
| return syscall(__NR_gettid);
|
| +#elif defined(OS_FREEBSD)
|
| + // TODO(benl): find a better thread ID
|
| + return reinterpret_cast<int32>(pthread_self());
|
| #endif
|
| }
|
|
|
| @@ -133,7 +136,7 @@
|
| return GetTickCount();
|
| #elif defined(OS_MACOSX)
|
| return mach_absolute_time();
|
| -#elif defined(OS_LINUX)
|
| +#elif defined(OS_LINUX) || defined(OS_FREEBSD)
|
| struct timespec ts;
|
| clock_gettime(CLOCK_MONOTONIC, &ts);
|
|
|
| @@ -214,7 +217,7 @@
|
| return true;
|
| }
|
|
|
| -#if defined(OS_LINUX)
|
| +#if defined(OS_LINUX) || defined(OS_FREEBSD)
|
| int GetLoggingFileDescriptor() {
|
| // No locking needed, since this is only called by the zygote server,
|
| // which is single-threaded.
|
|
|