summaryrefslogtreecommitdiffstats
path: root/adb/sysdeps.h
diff options
context:
space:
mode:
authorleozwang <leozwang@google.com>2014-08-15 09:51:27 -0700
committerLeo Wang <leozwang@google.com>2014-08-22 16:11:58 +0000
commitadb09fa01a16d8c5c92c2f8d325e1678c531223f (patch)
tree000b627a588bba1b23020eca9560956078a4da6a /adb/sysdeps.h
parent541a7d796aae220e631d2416e4aab4d31293219f (diff)
downloadsystem_core-adb09fa01a16d8c5c92c2f8d325e1678c531223f.zip
system_core-adb09fa01a16d8c5c92c2f8d325e1678c531223f.tar.gz
system_core-adb09fa01a16d8c5c92c2f8d325e1678c531223f.tar.bz2
Add more debug information.
Re-commit https://googleplex-android-review.googlesource.com/#/c/519430/ Add fix for win_sdk build. Add socketpair debug log. Also output thread information in log on host side. Change-Id: I21021bc111a3f7362a91b70593e3738125878118
Diffstat (limited to 'adb/sysdeps.h')
-rw-r--r--adb/sysdeps.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/adb/sysdeps.h b/adb/sysdeps.h
index ba4306f..f92038f 100644
--- a/adb/sysdeps.h
+++ b/adb/sysdeps.h
@@ -76,6 +76,11 @@ static __inline__ int adb_thread_create( adb_thread_t *thread, adb_thread_func
return 0;
}
+static __inline__ unsigned long adb_thread_id()
+{
+ return GetCurrentThreadId();
+}
+
static __inline__ void close_on_exec(int fd)
{
/* nothing really */
@@ -515,6 +520,12 @@ static __inline__ char* adb_strtok_r(char *str, const char *delim, char **savep
{
return strtok_r(str, delim, saveptr);
}
+
+static __inline__ unsigned long adb_thread_id()
+{
+ return pthread_self();
+}
+
#undef strtok_r
#define strtok_r ___xxx_strtok_r