summaryrefslogtreecommitdiff
path: root/libartbase/base/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'libartbase/base/utils.h')
-rw-r--r--libartbase/base/utils.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/libartbase/base/utils.h b/libartbase/base/utils.h
index b5e03dcdb8..32f8b87204 100644
--- a/libartbase/base/utils.h
+++ b/libartbase/base/utils.h
@@ -65,10 +65,14 @@ uint32_t GetTid();
// Returns the given thread's name.
std::string GetThreadName(pid_t tid);
-// Sets the name of the current thread. The name may be truncated to an
+// Sets the pthread name of the current thread. The name may be truncated to an
// implementation-defined limit.
void SetThreadName(const char* thread_name);
+// Sets the pthread name of the given thread. The name may be truncated to an
+// implementation-defined limit. Does nothing if not supported by the OS.
+void SetThreadName(pthread_t thr, const char* thread_name);
+
// Reads data from "/proc/self/task/${tid}/stat".
void GetTaskStats(pid_t tid, char* state, int* utime, int* stime, int* task_cpu);