Lines Matching refs:_sc

258 #define _BRIDGE_LOCK(_sc)               lck_mtx_lock(&(_sc)->sc_mtx)  argument
259 #define _BRIDGE_UNLOCK(_sc) lck_mtx_unlock(&(_sc)->sc_mtx) argument
260 #define BRIDGE_LOCK_ASSERT_HELD(_sc) \ argument
261 LCK_MTX_ASSERT(&(_sc)->sc_mtx, LCK_MTX_ASSERT_OWNED)
262 #define BRIDGE_LOCK_ASSERT_NOTHELD(_sc) \ argument
263 LCK_MTX_ASSERT(&(_sc)->sc_mtx, LCK_MTX_ASSERT_NOTOWNED)
270 #define BRIDGE_LOCK(_sc) bridge_lock(_sc) argument
271 #define BRIDGE_UNLOCK(_sc) bridge_unlock(_sc) argument
272 #define BRIDGE_LOCK2REF(_sc, _err) _err = bridge_lock2ref(_sc) argument
273 #define BRIDGE_UNREF(_sc) bridge_unref(_sc) argument
274 #define BRIDGE_XLOCK(_sc) bridge_xlock(_sc) argument
275 #define BRIDGE_XDROP(_sc) bridge_xdrop(_sc) argument
279 #define BRIDGE_LOCK(_sc) _BRIDGE_LOCK(_sc) argument
280 #define BRIDGE_UNLOCK(_sc) _BRIDGE_UNLOCK(_sc) argument
281 #define BRIDGE_LOCK2REF(_sc, _err) do { \ argument
282 BRIDGE_LOCK_ASSERT_HELD(_sc); \
283 if ((_sc)->sc_iflist_xcnt > 0) \
286 (_sc)->sc_iflist_ref++; \
289 _BRIDGE_UNLOCK(_sc); \
291 #define BRIDGE_UNREF(_sc) do { \ argument
292 _BRIDGE_LOCK(_sc); \
293 (_sc)->sc_iflist_ref--; \
294 if (((_sc)->sc_iflist_xcnt > 0) && ((_sc)->sc_iflist_ref == 0)) { \
295 _BRIDGE_UNLOCK(_sc); \
296 wakeup(&(_sc)->sc_cv); \
298 _BRIDGE_UNLOCK(_sc); \
300 #define BRIDGE_XLOCK(_sc) do { \ argument
301 BRIDGE_LOCK_ASSERT_HELD(_sc); \
302 (_sc)->sc_iflist_xcnt++; \
303 while ((_sc)->sc_iflist_ref > 0) \
304 msleep(&(_sc)->sc_cv, &(_sc)->sc_mtx, PZERO, \
307 #define BRIDGE_XDROP(_sc) do { \ argument
308 BRIDGE_LOCK_ASSERT_HELD(_sc); \
309 (_sc)->sc_iflist_xcnt--; \