Skip to content

Commit

Permalink
Stop touching kernel_lock directly, use the provided macros.
Browse files Browse the repository at this point in the history
ok pedro@
  • Loading branch information
haesbaert committed Feb 11, 2015
1 parent bbda296 commit fcd46c3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions sys/arch/amd64/amd64/intr.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,12 +570,12 @@ intr_handler(struct intrframe *frame, struct intrhand *ih)
need_lock = frame->if_ppl < IPL_SCHED;

if (need_lock)
__mp_lock(&kernel_lock);
KERNEL_LOCK();
#endif
rc = (*ih->ih_fun)(ih->ih_arg ? ih->ih_arg : frame);
#ifdef MULTIPROCESSOR
if (need_lock)
__mp_unlock(&kernel_lock);
KERNEL_UNLOCK();
#endif
return rc;
}
Expand Down
2 changes: 1 addition & 1 deletion sys/arch/amd64/amd64/ipifuncs.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ void
x86_64_ipi_halt(struct cpu_info *ci)
{
SCHED_ASSERT_UNLOCKED();
KASSERT(!__mp_lock_held(&kernel_lock));
KERNEL_ASSERT_UNLOCKED();

fpusave_cpu(ci, 1);
disable_intr();
Expand Down
4 changes: 2 additions & 2 deletions sys/arch/amd64/amd64/softintr.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ softintr_biglock_wrap(void *arg)
{
struct x86_soft_intrhand *sih = arg;

__mp_lock(&kernel_lock);
KERNEL_LOCK();
sih->sih_fnwrap(sih->sih_argwrap);
__mp_unlock(&kernel_lock);
KERNEL_UNLOCK();
}
#endif

Expand Down

0 comments on commit fcd46c3

Please sign in to comment.