summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorElliott Hughes2018-07-11 13:13:16 -0500
committerElliott Hughes2018-07-11 15:55:07 -0500
commit38488907a09c88d2c3954a2dc69e5a4785d6a5af (patch)
tree160d2c2cca2c491e1b905793e6f0d6b90d78beef /base
parent1db3789252342c5bfd34d889792866c3b4357b0c (diff)
downloadplatform-system-core-38488907a09c88d2c3954a2dc69e5a4785d6a5af.tar.gz
platform-system-core-38488907a09c88d2c3954a2dc69e5a4785d6a5af.tar.xz
platform-system-core-38488907a09c88d2c3954a2dc69e5a4785d6a5af.zip
Move libbacktrace off cutils.
There's still <cutils/atomic.h> in a test, but I don't understand why that isn't just std::atomic. Also add a shared tgkill wrapper to libbase. Bug: N/A Test: ran tests Change-Id: Idd4baa1e1670a84b3a8f35803cc5ffe5aae008a6
Diffstat (limited to 'base')
-rw-r--r--base/include/android-base/threads.h5
-rw-r--r--base/threads.cpp6
2 files changed, 11 insertions, 0 deletions
diff --git a/base/include/android-base/threads.h b/base/include/android-base/threads.h
index f4ba8091f..dba1fc620 100644
--- a/base/include/android-base/threads.h
+++ b/base/include/android-base/threads.h
@@ -23,3 +23,8 @@ namespace base {
23uint64_t GetThreadId(); 23uint64_t GetThreadId();
24} 24}
25} // namespace android 25} // namespace android
26
27#if defined(__GLIBC__)
28// bionic has this Linux-specifix call, but glibc doesn't.
29extern "C" int tgkill(int tgid, int tid, int sig);
30#endif
diff --git a/base/threads.cpp b/base/threads.cpp
index a71382bc5..48f6197ef 100644
--- a/base/threads.cpp
+++ b/base/threads.cpp
@@ -46,3 +46,9 @@ uint64_t GetThreadId() {
46 46
47} // namespace base 47} // namespace base
48} // namespace android 48} // namespace android
49
50#if defined(__GLIBC__)
51int tgkill(int tgid, int tid, int sig) {
52 return syscall(__NR_tgkill, tgid, tid, sig);
53}
54#endif