]> git.proxmox.com Git - mirror_ubuntu-kernels.git/blobdiff - include/linux/sched.h
[PATCH] cleanup in proc_check_chroot()
[mirror_ubuntu-kernels.git] / include / linux / sched.h
index 99855f694ebd453f954ec38558f505104d5f9180..95f248ba36c9bae2face0ffd725cc7917e58e67c 100644 (file)
@@ -100,6 +100,7 @@ DECLARE_PER_CPU(unsigned long, process_counts);
 extern int nr_processes(void);
 extern unsigned long nr_running(void);
 extern unsigned long nr_uninterruptible(void);
+extern unsigned long nr_active(void);
 extern unsigned long nr_iowait(void);
 
 #include <linux/time.h>
@@ -483,6 +484,7 @@ struct signal_struct {
 #define MAX_PRIO               (MAX_RT_PRIO + 40)
 
 #define rt_task(p)             (unlikely((p)->prio < MAX_RT_PRIO))
+#define batch_task(p)          (unlikely((p)->policy == SCHED_BATCH))
 
 /*
  * Some day this will be a full-fledged user tracking system..
@@ -683,6 +685,13 @@ static inline void prefetch_stack(struct task_struct *t) { }
 struct audit_context;          /* See audit.c */
 struct mempolicy;
 
+enum sleep_type {
+       SLEEP_NORMAL,
+       SLEEP_NONINTERACTIVE,
+       SLEEP_INTERACTIVE,
+       SLEEP_INTERRUPTED,
+};
+
 struct task_struct {
        volatile long state;    /* -1 unrunnable, 0 runnable, >0 stopped */
        struct thread_info *thread_info;
@@ -705,7 +714,7 @@ struct task_struct {
        unsigned long sleep_avg;
        unsigned long long timestamp, last_ran;
        unsigned long long sched_time; /* sched_clock time spent running */
-       int activated;
+       enum sleep_type sleep_type;
 
        unsigned long policy;
        cpumask_t cpus_allowed;
@@ -897,6 +906,7 @@ extern void free_task(struct task_struct *tsk);
 #define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0)
 
 extern void __put_task_struct_cb(struct rcu_head *rhp);
+extern void __put_task_struct(struct task_struct *t);
 
 static inline void put_task_struct(struct task_struct *t)
 {
@@ -1151,7 +1161,7 @@ extern void exit_thread(void);
 
 extern void exit_files(struct task_struct *);
 extern void __cleanup_signal(struct signal_struct *);
-extern void cleanup_sighand(struct task_struct *);
+extern void __cleanup_sighand(struct sighand_struct *);
 extern void exit_itimers(struct signal_struct *);
 
 extern NORET_TYPE void do_group_exit(int);