summaryrefslogtreecommitdiff
path: root/kern
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2017-02-13 23:05:25 +0100
committerRichard Braun <rbraun@sceen.net>2017-02-13 23:05:25 +0100
commit30e1c42921229143c7db7f80b9677c3fb24f36b1 (patch)
tree4b371cb3a0e3ebba35b096e9cf857341f236203b /kern
parenta26658f7ef6d92a03720fbf4d84a8e414e24dbe0 (diff)
kern/thread: minor change about scheduling class string representation
Diffstat (limited to 'kern')
-rw-r--r--kern/task.c2
-rw-r--r--kern/thread.c4
-rw-r--r--kern/thread.h12
3 files changed, 9 insertions, 9 deletions
diff --git a/kern/task.c b/kern/task.c
index f4586eed..afc2407a 100644
--- a/kern/task.c
+++ b/kern/task.c
@@ -150,7 +150,7 @@ task_info(struct task *task)
thread_state_to_chr(thread),
thread_wchan_desc(thread),
(unsigned long)thread_wchan_addr(thread),
- thread_schedclass_to_str(thread),
+ thread_sched_class_to_str(thread_sched_class(thread)),
thread_priority(thread),
thread->name);
}
diff --git a/kern/thread.c b/kern/thread.c
index f22ff760..49adf828 100644
--- a/kern/thread.c
+++ b/kern/thread.c
@@ -2341,9 +2341,9 @@ thread_state_to_chr(const struct thread *thread)
}
const char *
-thread_schedclass_to_str(const struct thread *thread)
+thread_sched_class_to_str(unsigned char sched_policy)
{
- switch (thread_sched_class(thread)) {
+ switch (sched_policy) {
case THREAD_SCHED_CLASS_RT:
return "rt";
case THREAD_SCHED_CLASS_FS:
diff --git a/kern/thread.h b/kern/thread.h
index 18a43986..723497db 100644
--- a/kern/thread.h
+++ b/kern/thread.h
@@ -277,11 +277,6 @@ thread_wchan_desc(const struct thread *thread)
*/
char thread_state_to_chr(const struct thread *thread);
-/*
- * Return a string representation of the scheduling class of a thread.
- */
-const char * thread_schedclass_to_str(const struct thread *thread);
-
static inline const struct thread_sched_data *
thread_get_sched_data(const struct thread *thread)
{
@@ -306,12 +301,17 @@ thread_priority(const struct thread *thread)
return thread_get_sched_data(thread)->priority;
}
-static inline unsigned short
+static inline unsigned int
thread_global_priority(const struct thread *thread)
{
return thread_get_sched_data(thread)->global_priority;
}
+/*
+ * Return a string representation of the scheduling class of a thread.
+ */
+const char * thread_sched_class_to_str(unsigned char sched_class);
+
static inline struct thread *
thread_from_tcb(struct tcb *tcb)
{