diff options
-rw-r--r-- | kern/task.c | 2 | ||||
-rw-r--r-- | kern/thread.c | 4 | ||||
-rw-r--r-- | kern/thread.h | 12 |
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) { |