--- zzzz-none-000/linux-2.6.28.10/include/linux/sched.h 2009-05-02 18:54:43.000000000 +0000 +++ fusiv-7390-686/linux-2.6.28.10/include/linux/sched.h 2013-04-30 12:09:16.000000000 +0000 @@ -1,6 +1,10 @@ #ifndef _LINUX_SCHED_H #define _LINUX_SCHED_H +#if defined(CONFIG_AVM_WATCHDOG) +extern volatile struct task_struct *hungingtask; +#endif/*--- #if defined(CONFIG_AVM_WATCHDOG) ---*/ + /* * cloning flags: */ @@ -146,15 +150,16 @@ print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq); #else static inline void -proc_sched_show_task(struct task_struct *p, struct seq_file *m) -{ +proc_sched_show_task(struct task_struct *p __attribute__ ((unused)), + struct seq_file *m __attribute__ ((unused))) { } -static inline void proc_sched_set_task(struct task_struct *p) -{ + +static inline void proc_sched_set_task(struct task_struct *p __attribute__ ((unused))) { } -static inline void -print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq) -{ + +static inline void print_cfs_rq(struct seq_file *m __attribute__ ((unused)), + int cpu __attribute__ ((unused)), + struct cfs_rq *cfs_rq __attribute__ ((unused))) { } #endif @@ -254,7 +259,7 @@ #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) extern int select_nohz_load_balancer(int cpu); #else -static inline int select_nohz_load_balancer(int cpu) +static inline int select_nohz_load_balancer(int cpu __attribute__ ((unused))) { return 0; } @@ -881,8 +886,8 @@ struct sched_domain_attr; static inline void -partition_sched_domains(int ndoms_new, cpumask_t *doms_new, - struct sched_domain_attr *dattr_new) +partition_sched_domains(int ndoms_new __attribute__ ((unused)), cpumask_t *doms_new __attribute__ ((unused)), + struct sched_domain_attr *dattr_new __attribute__ ((unused))) { } #endif /* !CONFIG_SMP */ @@ -924,7 +929,7 @@ #ifdef ARCH_HAS_PREFETCH_SWITCH_STACK extern void prefetch_stack(struct task_struct *t); #else -static inline void prefetch_stack(struct task_struct *t) { } +static inline void prefetch_stack(struct task_struct *t __attribute__ ((unused))) { } #endif struct audit_context; /* See audit.c */ @@ -1348,6 +1353,7 @@ int latency_record_count; struct latency_record latency_record[LT_SAVECOUNT]; #endif + unsigned int pg_faults; /* * time slack values; these are used to round up poll() and * select() etc timeout values. These are in nanoseconds. @@ -1356,6 +1362,8 @@ unsigned long default_timer_slack_ns; struct list_head *scm_work_list; + + __u32 netmark; /* AVM calle, generic network mark */ }; /* @@ -1596,7 +1604,7 @@ extern int set_cpus_allowed_ptr(struct task_struct *p, const cpumask_t *new_mask); #else -static inline int set_cpus_allowed_ptr(struct task_struct *p, +static inline int set_cpus_allowed_ptr(struct task_struct *p __attribute__ ((unused)), const cpumask_t *new_mask) { if (!cpu_isset(0, *new_mask)) @@ -1623,7 +1631,7 @@ { } -static inline void sched_clock_idle_wakeup_event(u64 delta_ns) +static inline void sched_clock_idle_wakeup_event(u64 delta_ns __attribute__ ((unused))) { } #else @@ -1663,7 +1671,7 @@ #if defined(CONFIG_NO_HZ) && defined(CONFIG_SMP) extern void wake_up_idle_cpu(int cpu); #else -static inline void wake_up_idle_cpu(int cpu) { } +static inline void wake_up_idle_cpu(int cpu __attribute__ ((unused))) { } #endif #ifdef CONFIG_SCHED_DEBUG @@ -1789,7 +1797,7 @@ #ifdef CONFIG_SMP extern void kick_process(struct task_struct *tsk); #else - static inline void kick_process(struct task_struct *tsk) { } + static inline void kick_process(struct task_struct *tsk __attribute__ ((unused))) { } #endif extern void sched_fork(struct task_struct *p, int clone_flags); extern void sched_dead(struct task_struct *p); @@ -1916,8 +1924,8 @@ #ifdef CONFIG_SMP extern unsigned long wait_task_inactive(struct task_struct *, long match_state); #else -static inline unsigned long wait_task_inactive(struct task_struct *p, - long match_state) +static inline unsigned long wait_task_inactive(struct task_struct *p __attribute__ ((unused)), + long match_state __attribute__ ((unused))) { return 1; } @@ -2084,9 +2092,20 @@ } static inline int signal_pending_state(long state, struct task_struct *p) -{ - if (!(state & (TASK_INTERRUPTIBLE | TASK_WAKEKILL))) +{ + if (!(state & (TASK_INTERRUPTIBLE | TASK_WAKEKILL))) { +#if defined(CONFIG_AVM_WATCHDOG) + if(p == hungingtask) { + /*--------------------------------------------------------------------------------*\ + mbahr: softwatchdog want to kill this process with SIGBUS to get actual position in USERLAND + even if TASK_UNINTERRUPTIBLE + \*--------------------------------------------------------------------------------*/ + hungingtask = NULL; + return 1; + } +#endif/*--- #if defined(CONFIG_AVM_WATCHDOG) ---*/ return 0; + } if (!signal_pending(p)) return 0; @@ -2129,7 +2148,7 @@ * task waiting?: (technically does not depend on CONFIG_PREEMPT, * but a general need for low latency) */ -static inline int spin_needbreak(spinlock_t *lock) +static inline int spin_needbreak(spinlock_t *lock __attribute__ ((unused))) { #ifdef CONFIG_PREEMPT return spin_is_contended(lock); @@ -2187,12 +2206,12 @@ #else -static inline unsigned int task_cpu(const struct task_struct *p) +static inline unsigned int task_cpu(const struct task_struct *p __attribute__ ((unused))) { return 0; } -static inline void set_task_cpu(struct task_struct *p, unsigned int cpu) +static inline void set_task_cpu(struct task_struct *p __attribute__ ((unused)), unsigned int cpu __attribute__ ((unused))) { } @@ -2206,8 +2225,8 @@ unsigned long arg1, unsigned long arg2, unsigned long arg3); #else static inline void -__trace_special(void *__tr, void *__data, - unsigned long arg1, unsigned long arg2, unsigned long arg3) +__trace_special(void *__tr __attribute__ ((unused)), void *__data __attribute__ ((unused)), + unsigned long arg1 __attribute__ ((unused)), unsigned long arg2 __attribute__ ((unused)), unsigned long arg3 __attribute__ ((unused))) { } #endif @@ -2264,19 +2283,19 @@ tsk->ioac.syscw++; } #else -static inline void add_rchar(struct task_struct *tsk, ssize_t amt) +static inline void add_rchar(struct task_struct *tsk __attribute__ ((unused)), ssize_t amt __attribute__ ((unused))) { } -static inline void add_wchar(struct task_struct *tsk, ssize_t amt) +static inline void add_wchar(struct task_struct *tsk __attribute__ ((unused)), ssize_t amt __attribute__ ((unused))) { } -static inline void inc_syscr(struct task_struct *tsk) +static inline void inc_syscr(struct task_struct *tsk __attribute__ ((unused))) { } -static inline void inc_syscw(struct task_struct *tsk) +static inline void inc_syscw(struct task_struct *tsk __attribute__ ((unused))) { } #endif @@ -2289,11 +2308,11 @@ extern void mm_update_next_owner(struct mm_struct *mm); extern void mm_init_owner(struct mm_struct *mm, struct task_struct *p); #else -static inline void mm_update_next_owner(struct mm_struct *mm) +static inline void mm_update_next_owner(struct mm_struct *mm __attribute__ ((unused))) { } -static inline void mm_init_owner(struct mm_struct *mm, struct task_struct *p) +static inline void mm_init_owner(struct mm_struct *mm __attribute__ ((unused)), struct task_struct *p __attribute__ ((unused))) { } #endif /* CONFIG_MM_OWNER */