diff options
Diffstat (limited to 'sys/netnatm/natm_pcb.c')
-rw-r--r-- | sys/netnatm/natm_pcb.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/netnatm/natm_pcb.c b/sys/netnatm/natm_pcb.c index 361e3c1..fd22719f 100644 --- a/sys/netnatm/natm_pcb.c +++ b/sys/netnatm/natm_pcb.c @@ -81,7 +81,8 @@ npcb_alloc(int wait) void npcb_free(struct natmpcb *npcb, int op) { - int s = splimp(); + + NATM_LOCK_ASSERT(); if ((npcb->npcb_flags & NPCB_FREE) == 0) { LIST_REMOVE(npcb, pcblist); @@ -94,8 +95,6 @@ npcb_free(struct natmpcb *npcb, int op) FREE(npcb, M_PCB); /* kill it! */ } } - - splx(s); } @@ -107,8 +106,8 @@ struct natmpcb * npcb_add(struct natmpcb *npcb, struct ifnet *ifp, u_int16_t vci, u_int8_t vpi) { struct natmpcb *cpcb = NULL; /* current pcb */ - int s = splimp(); + NATM_LOCK_ASSERT(); /* * lookup required @@ -147,7 +146,6 @@ npcb_add(struct natmpcb *npcb, struct ifnet *ifp, u_int16_t vci, u_int8_t vpi) LIST_INSERT_HEAD(&natm_pcbs, cpcb, pcblist); done: - splx(s); return (cpcb); } |