summaryrefslogtreecommitdiff
path: root/storage/xtradb/os/os0thread.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/xtradb/os/os0thread.cc')
-rw-r--r--storage/xtradb/os/os0thread.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/storage/xtradb/os/os0thread.cc b/storage/xtradb/os/os0thread.cc
index 13099e243cd..848c0ca4212 100644
--- a/storage/xtradb/os/os0thread.cc
+++ b/storage/xtradb/os/os0thread.cc
@@ -312,3 +312,21 @@ os_thread_set_priority(
return(relative_priority);
#endif
}
+
+/*****************************************************************//**
+Get priority for a given thread on Linux. Currently a
+no-op on other systems.
+
+@return An actual thread priority */
+UNIV_INTERN
+ulint
+os_thread_get_priority(
+/*===================*/
+ os_tid_t thread_id) /*!< in: thread id */
+{
+#ifdef UNIV_LINUX
+ return (getpriority(PRIO_PROCESS, thread_id));
+#else
+ return (0);
+#endif
+}