Index: base/threading/platform_thread_posix.cc |
diff --git a/base/threading/platform_thread_posix.cc b/base/threading/platform_thread_posix.cc |
index bd6ae2dc09913b6396469455f16891dba90948a8..605f72696f4db683a384333230cab906e4f6298a 100644 |
--- a/base/threading/platform_thread_posix.cc |
+++ b/base/threading/platform_thread_posix.cc |
@@ -124,6 +124,23 @@ bool CreateThread(size_t stack_size, |
} // namespace |
+// TODO(prashant.n): Move to common file across platforms. |
+std::string GetThreadPriorityAbbr(ThreadPriority priority) { |
+ switch (priority) { |
+ case ThreadPriority::BACKGROUND: |
+ return "bg"; |
+ case ThreadPriority::NORMAL: |
+ return "nl"; |
+ case ThreadPriority::DISPLAY: |
+ return "ds"; |
+ case ThreadPriority::REALTIME_AUDIO: |
+ return "rt"; |
+ default: |
+ NOTREACHED(); |
+ return ""; |
+ } |
+} |
+ |
// static |
PlatformThreadId PlatformThread::CurrentId() { |
// Pthreads doesn't have the concept of a thread ID, so we have to reach down |