aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-11-15 01:33:11 -0500
committerChris Wilson <chris@chris-wilson.co.uk>2010-11-15 01:33:11 -0500
commit1bb95834bbcdc969e477a9284cf96c17a4c2616f (patch)
tree9cf66b22a611bb6bc78778c05dac72263bb45a23 /include/linux/sched.h
parent85345517fe6d4de27b0d6ca19fef9d28ac947c4a (diff)
parenta41c73e04673b47730df682446f0d52f95e32a5b (diff)
Merge remote branch 'airlied/drm-fixes' into drm-intel-fixes
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 393ce94e54b7..d0036e52a24a 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -626,6 +626,10 @@ struct signal_struct {
626 626
627 int oom_adj; /* OOM kill score adjustment (bit shift) */ 627 int oom_adj; /* OOM kill score adjustment (bit shift) */
628 int oom_score_adj; /* OOM kill score adjustment */ 628 int oom_score_adj; /* OOM kill score adjustment */
629
630 struct mutex cred_guard_mutex; /* guard against foreign influences on
631 * credential calculations
632 * (notably. ptrace) */
629}; 633};
630 634
631/* Context switch must be unlocked if interrupts are to be enabled */ 635/* Context switch must be unlocked if interrupts are to be enabled */
@@ -668,6 +672,9 @@ struct user_struct {
668 atomic_t inotify_watches; /* How many inotify watches does this user have? */ 672 atomic_t inotify_watches; /* How many inotify watches does this user have? */
669 atomic_t inotify_devs; /* How many inotify devs does this user have opened? */ 673 atomic_t inotify_devs; /* How many inotify devs does this user have opened? */
670#endif 674#endif
675#ifdef CONFIG_FANOTIFY
676 atomic_t fanotify_listeners;
677#endif
671#ifdef CONFIG_EPOLL 678#ifdef CONFIG_EPOLL
672 atomic_t epoll_watches; /* The number of file descriptors currently watched */ 679 atomic_t epoll_watches; /* The number of file descriptors currently watched */
673#endif 680#endif
@@ -1076,7 +1083,7 @@ struct sched_class {
1076 struct task_struct *task); 1083 struct task_struct *task);
1077 1084
1078#ifdef CONFIG_FAIR_GROUP_SCHED 1085#ifdef CONFIG_FAIR_GROUP_SCHED
1079 void (*moved_group) (struct task_struct *p, int on_rq); 1086 void (*task_move_group) (struct task_struct *p, int on_rq);
1080#endif 1087#endif
1081}; 1088};
1082 1089
@@ -1305,9 +1312,6 @@ struct task_struct {
1305 * credentials (COW) */ 1312 * credentials (COW) */
1306 const struct cred __rcu *cred; /* effective (overridable) subjective task 1313 const struct cred __rcu *cred; /* effective (overridable) subjective task
1307 * credentials (COW) */ 1314 * credentials (COW) */
1308 struct mutex cred_guard_mutex; /* guard against foreign influences on
1309 * credential calculations
1310 * (notably. ptrace) */
1311 struct cred *replacement_session_keyring; /* for KEYCTL_SESSION_TO_PARENT */ 1315 struct cred *replacement_session_keyring; /* for KEYCTL_SESSION_TO_PARENT */
1312 1316
1313 char comm[TASK_COMM_LEN]; /* executable name excluding path 1317 char comm[TASK_COMM_LEN]; /* executable name excluding path
@@ -2236,9 +2240,16 @@ static inline void task_unlock(struct task_struct *p)
2236 spin_unlock(&p->alloc_lock); 2240 spin_unlock(&p->alloc_lock);
2237} 2241}
2238 2242
2239extern struct sighand_struct *lock_task_sighand(struct task_struct *tsk, 2243extern struct sighand_struct *__lock_task_sighand(struct task_struct *tsk,
2240 unsigned long *flags); 2244 unsigned long *flags);
2241 2245
2246#define lock_task_sighand(tsk, flags) \
2247({ struct sighand_struct *__ss; \
2248 __cond_lock(&(tsk)->sighand->siglock, \
2249 (__ss = __lock_task_sighand(tsk, flags))); \
2250 __ss; \
2251}) \
2252
2242static inline void unlock_task_sighand(struct task_struct *tsk, 2253static inline void unlock_task_sighand(struct task_struct *tsk,
2243 unsigned long *flags) 2254 unsigned long *flags)
2244{ 2255{