summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/exit.c6
-rw-r--r--kernel/sched.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 3a51fec0aabc..9cb99b471d2e 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -834,10 +834,10 @@ asmlinkage long sys_exit(int error_code)
do_exit((error_code&0xff)<<8);
}
-task_t fastcall *next_thread(task_t *p)
+task_t fastcall *next_thread(const task_t *p)
{
- struct pid_link *link = p->pids + PIDTYPE_TGID;
- struct list_head *tmp, *head = &link->pidptr->task_list;
+ const struct pid_link *link = p->pids + PIDTYPE_TGID;
+ const struct list_head *tmp, *head = &link->pidptr->task_list;
#ifdef CONFIG_SMP
if (!p->sighand)
diff --git a/kernel/sched.c b/kernel/sched.c
index 10c2581f40fe..8f49ba1202c3 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -546,7 +546,7 @@ static inline void resched_task(task_t *p)
* task_curr - is this task currently executing on a CPU?
* @p: the task in question.
*/
-inline int task_curr(task_t *p)
+inline int task_curr(const task_t *p)
{
return cpu_curr(task_cpu(p)) == p;
}
@@ -2658,7 +2658,7 @@ asmlinkage long sys_nice(int increment)
* RT tasks are offset by -200. Normal tasks are centered
* around 0, value goes from -16 to +15.
*/
-int task_prio(task_t *p)
+int task_prio(const task_t *p)
{
return p->prio - MAX_RT_PRIO;
}
@@ -2667,7 +2667,7 @@ int task_prio(task_t *p)
* task_nice - return the nice value of a given task.
* @p: the task in question.
*/
-int task_nice(task_t *p)
+int task_nice(const task_t *p)
{
return TASK_NICE(p);
}