diff options
| author | Linus Torvalds <torvalds@penguin.transmeta.com> | 2002-07-21 23:42:32 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-07-21 23:42:32 -0700 |
| commit | 7ee2f6c993a829cc24cce819261bc2b6053348cc (patch) | |
| tree | 5070cee11150ce4d489dcbc7b33c4165c2b71fe7 /include | |
| parent | 8d27a6479b349d2431a114092824a52a2b1af037 (diff) | |
Ingo Molnar's update to remove irqlock (documentation and fixing
a number of drivers)
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/interrupt.h | 10 | ||||
| -rw-r--r-- | include/linux/smp.h | 5 |
2 files changed, 13 insertions, 2 deletions
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 3870d26066e9..09e6b86ee763 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h @@ -44,6 +44,16 @@ enum { #include <asm/hardirq.h> #include <asm/softirq.h> +/* + * Temporary defines for UP kernels, until all code gets fixed. + */ +#if !CONFIG_SMP +# define cli() local_irq_disable() +# define sti() local_irq_enable() +# define save_flags(x) local_irq_save(x) +# define restore_flags(x) local_irq_restore(x) +# define save_and_cli(x) local_irq_save_off(x) +#endif /* PLEASE, avoid to allocate new softirqs, if you need not _really_ high diff --git a/include/linux/smp.h b/include/linux/smp.h index 6e89d1d34bd8..fff7c165ac2d 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h @@ -95,7 +95,8 @@ static inline void smp_send_reschedule_all(void) { } #endif /* !SMP */ -#define get_cpu() ({ preempt_disable(); smp_processor_id(); }) -#define put_cpu() preempt_enable() +#define get_cpu() ({ preempt_disable(); smp_processor_id(); }) +#define put_cpu() preempt_enable() +#define put_cpu_no_resched() preempt_enable_no_resched() #endif /* __LINUX_SMP_H */ |
