patch-2.1.132 linux/include/asm-ppc/mmu_context.h
Next file: linux/include/asm-ppc/resource.h
Previous file: linux/include/asm-ppc/io.h
Back to the patch index
Back to the overall index
- Lines: 21
- Date:
Mon Dec 21 08:37:24 1998
- Orig file:
v2.1.131/linux/include/asm-ppc/mmu_context.h
- Orig date:
Mon Oct 5 13:13:43 1998
diff -u --recursive --new-file v2.1.131/linux/include/asm-ppc/mmu_context.h linux/include/asm-ppc/mmu_context.h
@@ -38,7 +38,7 @@
#define MUNGE_CONTEXT(n) (((n) * 897) & LAST_CONTEXT)
#endif
-extern int next_mmu_context;
+extern atomic_t next_mmu_context;
extern void mmu_context_overflow(void);
#ifndef CONFIG_8xx
@@ -54,9 +54,9 @@
do { \
struct mm_struct *mm = (tsk)->mm; \
if (mm->context == NO_CONTEXT) { \
- if (next_mmu_context == LAST_CONTEXT) \
+ if (atomic_read(&next_mmu_context) == LAST_CONTEXT) \
mmu_context_overflow(); \
- mm->context = MUNGE_CONTEXT(++next_mmu_context);\
+ mm->context = MUNGE_CONTEXT(atomic_inc_return(&next_mmu_context));\
} \
} while (0)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov