diff options
Diffstat (limited to 'include/asm-m68k/softirq.h')
-rw-r--r-- | include/asm-m68k/softirq.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/asm-m68k/softirq.h b/include/asm-m68k/softirq.h index 89c786665..dc5f56728 100644 --- a/include/asm-m68k/softirq.h +++ b/include/asm-m68k/softirq.h @@ -13,7 +13,7 @@ extern inline void init_bh(int nr, void (*routine)(void)) { bh_base[nr] = routine; - bh_mask_count[nr] = 0; + atomic_set(&bh_mask_count[nr], 0); bh_mask |= 1 << nr; } @@ -29,12 +29,12 @@ extern inline void mark_bh(int nr) extern inline void disable_bh(int nr) { bh_mask &= ~(1 << nr); - bh_mask_count[nr]++; + atomic_inc(&bh_mask_count[nr]); } extern inline void enable_bh(int nr) { - if (!--bh_mask_count[nr]) + if (atomic_dec_and_test(&bh_mask_count[nr])) bh_mask |= 1 << nr; } |