Commit 10b8b2be authored by Tristan Matthews's avatar Tristan Matthews

logger: don't depend on pthread

Refs #57370
Refs #59284

Change-Id: I9374db3593b262f1f4363d71f0c0455b6a005319
parent c4f44ba7
......@@ -35,9 +35,6 @@
extern "C" {
#endif
#include <stdint.h>
#include <pthread.h>
/**
* Print something, coloring it depending on the level
*/
......@@ -63,9 +60,19 @@ int getDebugMode(void);
*/
void strErr();
#ifdef __linux__
#include <unistd.h>
#include <sys/syscall.h>
#define LOG_FORMAT(M, ...) "%s:%d:0x%x: " M, FILE_NAME, __LINE__, \
(unsigned long) pthread_self() & 0xffff, \
syscall(__NR_gettid) & 0xffff, \
##__VA_ARGS__
#else
#define LOG_FORMAT(M, ...) "%s:%d: " M, FILE_NAME, __LINE__, \
##__VA_ARGS__
#endif
#ifdef __ANDROID__
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment