diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sched.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 24e08d1d900d..3c07d595979f 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1201,7 +1201,7 @@ static inline int rt_prio(int prio) | |||
1201 | return 0; | 1201 | return 0; |
1202 | } | 1202 | } |
1203 | 1203 | ||
1204 | static inline int rt_task(const struct task_struct *p) | 1204 | static inline int rt_task(struct task_struct *p) |
1205 | { | 1205 | { |
1206 | return rt_prio(p->prio); | 1206 | return rt_prio(p->prio); |
1207 | } | 1207 | } |
@@ -1216,22 +1216,22 @@ static inline void set_task_pgrp(struct task_struct *tsk, pid_t pgrp) | |||
1216 | tsk->signal->__pgrp = pgrp; | 1216 | tsk->signal->__pgrp = pgrp; |
1217 | } | 1217 | } |
1218 | 1218 | ||
1219 | static inline struct pid *task_pid(const struct task_struct *task) | 1219 | static inline struct pid *task_pid(struct task_struct *task) |
1220 | { | 1220 | { |
1221 | return task->pids[PIDTYPE_PID].pid; | 1221 | return task->pids[PIDTYPE_PID].pid; |
1222 | } | 1222 | } |
1223 | 1223 | ||
1224 | static inline struct pid *task_tgid(const struct task_struct *task) | 1224 | static inline struct pid *task_tgid(struct task_struct *task) |
1225 | { | 1225 | { |
1226 | return task->group_leader->pids[PIDTYPE_PID].pid; | 1226 | return task->group_leader->pids[PIDTYPE_PID].pid; |
1227 | } | 1227 | } |
1228 | 1228 | ||
1229 | static inline struct pid *task_pgrp(const struct task_struct *task) | 1229 | static inline struct pid *task_pgrp(struct task_struct *task) |
1230 | { | 1230 | { |
1231 | return task->group_leader->pids[PIDTYPE_PGID].pid; | 1231 | return task->group_leader->pids[PIDTYPE_PGID].pid; |
1232 | } | 1232 | } |
1233 | 1233 | ||
1234 | static inline struct pid *task_session(const struct task_struct *task) | 1234 | static inline struct pid *task_session(struct task_struct *task) |
1235 | { | 1235 | { |
1236 | return task->group_leader->pids[PIDTYPE_SID].pid; | 1236 | return task->group_leader->pids[PIDTYPE_SID].pid; |
1237 | } | 1237 | } |
@@ -1260,7 +1260,7 @@ struct pid_namespace; | |||
1260 | * see also pid_nr() etc in include/linux/pid.h | 1260 | * see also pid_nr() etc in include/linux/pid.h |
1261 | */ | 1261 | */ |
1262 | 1262 | ||
1263 | static inline pid_t task_pid_nr(const struct task_struct *tsk) | 1263 | static inline pid_t task_pid_nr(struct task_struct *tsk) |
1264 | { | 1264 | { |
1265 | return tsk->pid; | 1265 | return tsk->pid; |
1266 | } | 1266 | } |
@@ -1273,7 +1273,7 @@ static inline pid_t task_pid_vnr(struct task_struct *tsk) | |||
1273 | } | 1273 | } |
1274 | 1274 | ||
1275 | 1275 | ||
1276 | static inline pid_t task_tgid_nr(const struct task_struct *tsk) | 1276 | static inline pid_t task_tgid_nr(struct task_struct *tsk) |
1277 | { | 1277 | { |
1278 | return tsk->tgid; | 1278 | return tsk->tgid; |
1279 | } | 1279 | } |
@@ -1286,7 +1286,7 @@ static inline pid_t task_tgid_vnr(struct task_struct *tsk) | |||
1286 | } | 1286 | } |
1287 | 1287 | ||
1288 | 1288 | ||
1289 | static inline pid_t task_pgrp_nr(const struct task_struct *tsk) | 1289 | static inline pid_t task_pgrp_nr(struct task_struct *tsk) |
1290 | { | 1290 | { |
1291 | return tsk->signal->__pgrp; | 1291 | return tsk->signal->__pgrp; |
1292 | } | 1292 | } |
@@ -1299,7 +1299,7 @@ static inline pid_t task_pgrp_vnr(struct task_struct *tsk) | |||
1299 | } | 1299 | } |
1300 | 1300 | ||
1301 | 1301 | ||
1302 | static inline pid_t task_session_nr(const struct task_struct *tsk) | 1302 | static inline pid_t task_session_nr(struct task_struct *tsk) |
1303 | { | 1303 | { |
1304 | return tsk->signal->__session; | 1304 | return tsk->signal->__session; |
1305 | } | 1305 | } |
@@ -1326,7 +1326,7 @@ static inline pid_t task_ppid_nr_ns(struct task_struct *tsk, | |||
1326 | * If pid_alive fails, then pointers within the task structure | 1326 | * If pid_alive fails, then pointers within the task structure |
1327 | * can be stale and must not be dereferenced. | 1327 | * can be stale and must not be dereferenced. |
1328 | */ | 1328 | */ |
1329 | static inline int pid_alive(const struct task_struct *p) | 1329 | static inline int pid_alive(struct task_struct *p) |
1330 | { | 1330 | { |
1331 | return p->pids[PIDTYPE_PID].pid != NULL; | 1331 | return p->pids[PIDTYPE_PID].pid != NULL; |
1332 | } | 1332 | } |
@@ -1337,7 +1337,7 @@ static inline int pid_alive(const struct task_struct *p) | |||
1337 | * | 1337 | * |
1338 | * Check if a task structure is the first user space task the kernel created. | 1338 | * Check if a task structure is the first user space task the kernel created. |
1339 | */ | 1339 | */ |
1340 | static inline int is_global_init(const struct task_struct *tsk) | 1340 | static inline int is_global_init(struct task_struct *tsk) |
1341 | { | 1341 | { |
1342 | return tsk->pid == 1; | 1342 | return tsk->pid == 1; |
1343 | } | 1343 | } |
@@ -1474,7 +1474,7 @@ extern int rt_mutex_getprio(struct task_struct *p); | |||
1474 | extern void rt_mutex_setprio(struct task_struct *p, int prio); | 1474 | extern void rt_mutex_setprio(struct task_struct *p, int prio); |
1475 | extern void rt_mutex_adjust_pi(struct task_struct *p); | 1475 | extern void rt_mutex_adjust_pi(struct task_struct *p); |
1476 | #else | 1476 | #else |
1477 | static inline int rt_mutex_getprio(const struct task_struct *p) | 1477 | static inline int rt_mutex_getprio(struct task_struct *p) |
1478 | { | 1478 | { |
1479 | return p->normal_prio; | 1479 | return p->normal_prio; |
1480 | } | 1480 | } |
@@ -1726,7 +1726,7 @@ extern void wait_task_inactive(struct task_struct * p); | |||
1726 | * all we care about is that we have a task with the appropriate | 1726 | * all we care about is that we have a task with the appropriate |
1727 | * pid, we don't actually care if we have the right task. | 1727 | * pid, we don't actually care if we have the right task. |
1728 | */ | 1728 | */ |
1729 | static inline int has_group_leader_pid(const struct task_struct *p) | 1729 | static inline int has_group_leader_pid(struct task_struct *p) |
1730 | { | 1730 | { |
1731 | return p->pid == p->tgid; | 1731 | return p->pid == p->tgid; |
1732 | } | 1732 | } |
@@ -1743,7 +1743,7 @@ static inline struct task_struct *next_thread(const struct task_struct *p) | |||
1743 | struct task_struct, thread_group); | 1743 | struct task_struct, thread_group); |
1744 | } | 1744 | } |
1745 | 1745 | ||
1746 | static inline int thread_group_empty(const struct task_struct *p) | 1746 | static inline int thread_group_empty(struct task_struct *p) |
1747 | { | 1747 | { |
1748 | return list_empty(&p->thread_group); | 1748 | return list_empty(&p->thread_group); |
1749 | } | 1749 | } |