diff options
| author | Paul Mackerras <paulus@samba.org> | 2007-10-03 01:33:17 -0400 |
|---|---|---|
| committer | Paul Mackerras <paulus@samba.org> | 2007-10-03 01:33:17 -0400 |
| commit | 70f227d8846a8a9b1f36f71c42e11cc7c6e9408d (patch) | |
| tree | fb4dd5c8240bdaada819fb569c01a392b52847b9 /include/linux | |
| parent | a0c7ce9c877ceef8428798ac91fb794f83609aed (diff) | |
| parent | f778089cb2445dfc6dfd30a7a567925fd8589f1e (diff) | |
Merge branch 'linux-2.6' into for-2.6.24
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/cpufreq.h | 19 | ||||
| -rw-r--r-- | include/linux/init_task.h | 2 | ||||
| -rw-r--r-- | include/linux/sched.h | 3 | ||||
| -rw-r--r-- | include/linux/signalfd.h | 40 |
4 files changed, 10 insertions, 54 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 963051a967d6..3ec6e7ff5fbd 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
| @@ -32,15 +32,7 @@ | |||
| 32 | * CPUFREQ NOTIFIER INTERFACE * | 32 | * CPUFREQ NOTIFIER INTERFACE * |
| 33 | *********************************************************************/ | 33 | *********************************************************************/ |
| 34 | 34 | ||
| 35 | #ifdef CONFIG_CPU_FREQ | ||
| 36 | int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list); | 35 | int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list); |
| 37 | #else | ||
| 38 | static inline int cpufreq_register_notifier(struct notifier_block *nb, | ||
| 39 | unsigned int list) | ||
| 40 | { | ||
| 41 | return 0; | ||
| 42 | } | ||
| 43 | #endif | ||
| 44 | int cpufreq_unregister_notifier(struct notifier_block *nb, unsigned int list); | 36 | int cpufreq_unregister_notifier(struct notifier_block *nb, unsigned int list); |
| 45 | 37 | ||
| 46 | #define CPUFREQ_TRANSITION_NOTIFIER (0) | 38 | #define CPUFREQ_TRANSITION_NOTIFIER (0) |
| @@ -268,22 +260,17 @@ struct freq_attr { | |||
| 268 | int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu); | 260 | int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu); |
| 269 | int cpufreq_update_policy(unsigned int cpu); | 261 | int cpufreq_update_policy(unsigned int cpu); |
| 270 | 262 | ||
| 263 | /* query the current CPU frequency (in kHz). If zero, cpufreq couldn't detect it */ | ||
| 264 | unsigned int cpufreq_get(unsigned int cpu); | ||
| 271 | 265 | ||
| 272 | /* | 266 | /* query the last known CPU freq (in kHz). If zero, cpufreq couldn't detect it */ |
| 273 | * query the last known CPU freq (in kHz). If zero, cpufreq couldn't detect it | ||
| 274 | */ | ||
| 275 | #ifdef CONFIG_CPU_FREQ | 267 | #ifdef CONFIG_CPU_FREQ |
| 276 | unsigned int cpufreq_quick_get(unsigned int cpu); | 268 | unsigned int cpufreq_quick_get(unsigned int cpu); |
| 277 | unsigned int cpufreq_get(unsigned int cpu); | ||
| 278 | #else | 269 | #else |
| 279 | static inline unsigned int cpufreq_quick_get(unsigned int cpu) | 270 | static inline unsigned int cpufreq_quick_get(unsigned int cpu) |
| 280 | { | 271 | { |
| 281 | return 0; | 272 | return 0; |
| 282 | } | 273 | } |
| 283 | static inline unsigned int cpufreq_get(unsigned int cpu) | ||
| 284 | { | ||
| 285 | return 0; | ||
| 286 | } | ||
| 287 | #endif | 274 | #endif |
| 288 | 275 | ||
| 289 | 276 | ||
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index cab741c2d603..f8abfa349ef9 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
| @@ -86,7 +86,7 @@ extern struct nsproxy init_nsproxy; | |||
| 86 | .count = ATOMIC_INIT(1), \ | 86 | .count = ATOMIC_INIT(1), \ |
| 87 | .action = { { { .sa_handler = NULL, } }, }, \ | 87 | .action = { { { .sa_handler = NULL, } }, }, \ |
| 88 | .siglock = __SPIN_LOCK_UNLOCKED(sighand.siglock), \ | 88 | .siglock = __SPIN_LOCK_UNLOCKED(sighand.siglock), \ |
| 89 | .signalfd_list = LIST_HEAD_INIT(sighand.signalfd_list), \ | 89 | .signalfd_wqh = __WAIT_QUEUE_HEAD_INITIALIZER(sighand.signalfd_wqh), \ |
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | extern struct group_info init_groups; | 92 | extern struct group_info init_groups; |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 5445eaec6908..a01ac6dd5f5e 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -438,7 +438,7 @@ struct sighand_struct { | |||
| 438 | atomic_t count; | 438 | atomic_t count; |
| 439 | struct k_sigaction action[_NSIG]; | 439 | struct k_sigaction action[_NSIG]; |
| 440 | spinlock_t siglock; | 440 | spinlock_t siglock; |
| 441 | struct list_head signalfd_list; | 441 | wait_queue_head_t signalfd_wqh; |
| 442 | }; | 442 | }; |
| 443 | 443 | ||
| 444 | struct pacct_struct { | 444 | struct pacct_struct { |
| @@ -1406,6 +1406,7 @@ extern unsigned int sysctl_sched_wakeup_granularity; | |||
| 1406 | extern unsigned int sysctl_sched_batch_wakeup_granularity; | 1406 | extern unsigned int sysctl_sched_batch_wakeup_granularity; |
| 1407 | extern unsigned int sysctl_sched_stat_granularity; | 1407 | extern unsigned int sysctl_sched_stat_granularity; |
| 1408 | extern unsigned int sysctl_sched_runtime_limit; | 1408 | extern unsigned int sysctl_sched_runtime_limit; |
| 1409 | extern unsigned int sysctl_sched_compat_yield; | ||
| 1409 | extern unsigned int sysctl_sched_child_runs_first; | 1410 | extern unsigned int sysctl_sched_child_runs_first; |
| 1410 | extern unsigned int sysctl_sched_features; | 1411 | extern unsigned int sysctl_sched_features; |
| 1411 | 1412 | ||
diff --git a/include/linux/signalfd.h b/include/linux/signalfd.h index 510429495690..4c9ff0910ae0 100644 --- a/include/linux/signalfd.h +++ b/include/linux/signalfd.h | |||
| @@ -45,49 +45,17 @@ struct signalfd_siginfo { | |||
| 45 | #ifdef CONFIG_SIGNALFD | 45 | #ifdef CONFIG_SIGNALFD |
| 46 | 46 | ||
| 47 | /* | 47 | /* |
| 48 | * Deliver the signal to listening signalfd. This must be called | 48 | * Deliver the signal to listening signalfd. |
| 49 | * with the sighand lock held. Same are the following that end up | ||
| 50 | * calling signalfd_deliver(). | ||
| 51 | */ | ||
| 52 | void signalfd_deliver(struct task_struct *tsk, int sig); | ||
| 53 | |||
| 54 | /* | ||
| 55 | * No need to fall inside signalfd_deliver() if no signal listeners | ||
| 56 | * are available. | ||
| 57 | */ | 49 | */ |
| 58 | static inline void signalfd_notify(struct task_struct *tsk, int sig) | 50 | static inline void signalfd_notify(struct task_struct *tsk, int sig) |
| 59 | { | 51 | { |
| 60 | if (unlikely(!list_empty(&tsk->sighand->signalfd_list))) | 52 | if (unlikely(waitqueue_active(&tsk->sighand->signalfd_wqh))) |
| 61 | signalfd_deliver(tsk, sig); | 53 | wake_up(&tsk->sighand->signalfd_wqh); |
| 62 | } | ||
| 63 | |||
| 64 | /* | ||
| 65 | * The signal -1 is used to notify the signalfd that the sighand | ||
| 66 | * is on its way to be detached. | ||
| 67 | */ | ||
| 68 | static inline void signalfd_detach_locked(struct task_struct *tsk) | ||
| 69 | { | ||
| 70 | if (unlikely(!list_empty(&tsk->sighand->signalfd_list))) | ||
| 71 | signalfd_deliver(tsk, -1); | ||
| 72 | } | ||
| 73 | |||
| 74 | static inline void signalfd_detach(struct task_struct *tsk) | ||
| 75 | { | ||
| 76 | struct sighand_struct *sighand = tsk->sighand; | ||
| 77 | |||
| 78 | if (unlikely(!list_empty(&sighand->signalfd_list))) { | ||
| 79 | spin_lock_irq(&sighand->siglock); | ||
| 80 | signalfd_deliver(tsk, -1); | ||
| 81 | spin_unlock_irq(&sighand->siglock); | ||
| 82 | } | ||
| 83 | } | 54 | } |
| 84 | 55 | ||
| 85 | #else /* CONFIG_SIGNALFD */ | 56 | #else /* CONFIG_SIGNALFD */ |
| 86 | 57 | ||
| 87 | #define signalfd_deliver(t, s) do { } while (0) | 58 | static inline void signalfd_notify(struct task_struct *tsk, int sig) { } |
| 88 | #define signalfd_notify(t, s) do { } while (0) | ||
| 89 | #define signalfd_detach_locked(t) do { } while (0) | ||
| 90 | #define signalfd_detach(t) do { } while (0) | ||
| 91 | 59 | ||
| 92 | #endif /* CONFIG_SIGNALFD */ | 60 | #endif /* CONFIG_SIGNALFD */ |
| 93 | 61 | ||
