diff options
author | Elliott Hughes <enh@google.com> | 2014-08-18 19:34:23 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-08-18 19:34:23 +0000 |
commit | 10cce72c4bbc8bb8e6466b5511e178321862658a (patch) | |
tree | f7f2c135302c5528bd45be0fe79610e5cdc91d15 | |
parent | 932c3a1d0507da5ff8d7183fa5a795bce0a86c19 (diff) | |
parent | 3859029a48aa78150fa61eb4988214f8632b33ce (diff) | |
download | system_core-10cce72c4bbc8bb8e6466b5511e178321862658a.zip system_core-10cce72c4bbc8bb8e6466b5511e178321862658a.tar.gz system_core-10cce72c4bbc8bb8e6466b5511e178321862658a.tar.bz2 |
am 3859029a: am 7fb0ee0c: Merge "Remove androidGetTid."
* commit '3859029a48aa78150fa61eb4988214f8632b33ce':
Remove androidGetTid.
-rw-r--r-- | include/utils/AndroidThreads.h | 3 | ||||
-rw-r--r-- | include/utils/Thread.h | 4 | ||||
-rw-r--r-- | libcutils/sched_policy.c | 4 | ||||
-rw-r--r-- | libutils/Threads.cpp | 9 |
4 files changed, 2 insertions, 18 deletions
diff --git a/include/utils/AndroidThreads.h b/include/utils/AndroidThreads.h index 4eee14d..3c640b6 100644 --- a/include/utils/AndroidThreads.h +++ b/include/utils/AndroidThreads.h @@ -73,9 +73,6 @@ extern void androidSetCreateThreadFunc(android_create_thread_fn func); // ------------------------------------------------------------------ // Extra functions working with raw pids. -// Get pid for the current thread. -extern pid_t androidGetTid(); - #ifdef HAVE_ANDROID_OS // Change the priority AND scheduling group of a particular thread. The priority // should be one of the ANDROID_PRIORITY constants. Returns INVALID_OPERATION diff --git a/include/utils/Thread.h b/include/utils/Thread.h index df30611..c867e95 100644 --- a/include/utils/Thread.h +++ b/include/utils/Thread.h @@ -71,8 +71,8 @@ public: bool isRunning() const; #ifdef HAVE_ANDROID_OS - // Return the thread's kernel ID, same as the thread itself calling gettid() or - // androidGetTid(), or -1 if the thread is not running. + // Return the thread's kernel ID, same as the thread itself calling gettid(), + // or -1 if the thread is not running. pid_t getTid() const; #endif diff --git a/libcutils/sched_policy.c b/libcutils/sched_policy.c index 2acc3c3..d3cedd4 100644 --- a/libcutils/sched_policy.c +++ b/libcutils/sched_policy.c @@ -221,11 +221,9 @@ static int getSchedulerGroup(int tid, char* buf, size_t bufLen) int get_sched_policy(int tid, SchedPolicy *policy) { -#ifdef HAVE_GETTID if (tid == 0) { tid = gettid(); } -#endif pthread_once(&the_once, __initialize); if (__sys_supports_schedgroups) { @@ -260,11 +258,9 @@ int get_sched_policy(int tid, SchedPolicy *policy) int set_sched_policy(int tid, SchedPolicy policy) { -#ifdef HAVE_GETTID if (tid == 0) { tid = gettid(); } -#endif policy = _policy(policy); pthread_once(&the_once, __initialize); diff --git a/libutils/Threads.cpp b/libutils/Threads.cpp index b09d510..03fde97 100644 --- a/libutils/Threads.cpp +++ b/libutils/Threads.cpp @@ -306,15 +306,6 @@ void androidSetCreateThreadFunc(android_create_thread_fn func) gCreateThreadFn = func; } -pid_t androidGetTid() -{ -#ifdef HAVE_GETTID - return gettid(); -#else - return getpid(); -#endif -} - #ifdef HAVE_ANDROID_OS int androidSetThreadPriority(pid_t tid, int pri) { |