Merge "Remove androidGetTid."
This commit is contained in:
commit
7fb0ee0c4d
4 changed files with 2 additions and 18 deletions
|
|
@ -73,9 +73,6 @@ extern void androidSetCreateThreadFunc(android_create_thread_fn func);
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
// Extra functions working with raw pids.
|
// Extra functions working with raw pids.
|
||||||
|
|
||||||
// Get pid for the current thread.
|
|
||||||
extern pid_t androidGetTid();
|
|
||||||
|
|
||||||
#ifdef HAVE_ANDROID_OS
|
#ifdef HAVE_ANDROID_OS
|
||||||
// Change the priority AND scheduling group of a particular thread. The priority
|
// Change the priority AND scheduling group of a particular thread. The priority
|
||||||
// should be one of the ANDROID_PRIORITY constants. Returns INVALID_OPERATION
|
// should be one of the ANDROID_PRIORITY constants. Returns INVALID_OPERATION
|
||||||
|
|
|
||||||
|
|
@ -71,8 +71,8 @@ public:
|
||||||
bool isRunning() const;
|
bool isRunning() const;
|
||||||
|
|
||||||
#ifdef HAVE_ANDROID_OS
|
#ifdef HAVE_ANDROID_OS
|
||||||
// Return the thread's kernel ID, same as the thread itself calling gettid() or
|
// Return the thread's kernel ID, same as the thread itself calling gettid(),
|
||||||
// androidGetTid(), or -1 if the thread is not running.
|
// or -1 if the thread is not running.
|
||||||
pid_t getTid() const;
|
pid_t getTid() const;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -222,11 +222,9 @@ static int getSchedulerGroup(int tid, char* buf, size_t bufLen)
|
||||||
|
|
||||||
int get_sched_policy(int tid, SchedPolicy *policy)
|
int get_sched_policy(int tid, SchedPolicy *policy)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_GETTID
|
|
||||||
if (tid == 0) {
|
if (tid == 0) {
|
||||||
tid = gettid();
|
tid = gettid();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
pthread_once(&the_once, __initialize);
|
pthread_once(&the_once, __initialize);
|
||||||
|
|
||||||
if (__sys_supports_schedgroups) {
|
if (__sys_supports_schedgroups) {
|
||||||
|
|
@ -261,11 +259,9 @@ int get_sched_policy(int tid, SchedPolicy *policy)
|
||||||
|
|
||||||
int set_sched_policy(int tid, SchedPolicy policy)
|
int set_sched_policy(int tid, SchedPolicy policy)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_GETTID
|
|
||||||
if (tid == 0) {
|
if (tid == 0) {
|
||||||
tid = gettid();
|
tid = gettid();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
policy = _policy(policy);
|
policy = _policy(policy);
|
||||||
pthread_once(&the_once, __initialize);
|
pthread_once(&the_once, __initialize);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -306,15 +306,6 @@ void androidSetCreateThreadFunc(android_create_thread_fn func)
|
||||||
gCreateThreadFn = func;
|
gCreateThreadFn = func;
|
||||||
}
|
}
|
||||||
|
|
||||||
pid_t androidGetTid()
|
|
||||||
{
|
|
||||||
#ifdef HAVE_GETTID
|
|
||||||
return gettid();
|
|
||||||
#else
|
|
||||||
return getpid();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef HAVE_ANDROID_OS
|
#ifdef HAVE_ANDROID_OS
|
||||||
int androidSetThreadPriority(pid_t tid, int pri)
|
int androidSetThreadPriority(pid_t tid, int pri)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue