Lines Matching +full:software +full:- +full:locked

1 /*-
2 * Copyright (c) 1999-2002, 2009, 2019 Robert N. M. Watson
4 * Copyright (c) 2001-2004 Networks Associates Technology, Inc.
9 * This software was developed by Robert Watson and Ilmar Habibulin for the
12 * This software was enhanced by SPARTA ISSO under SPAWAR contract
13 * N66001-04-C-6019 ("SEFOS").
15 * This software was developed for the FreeBSD Project in part by Network
17 * Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"),
20 * This software was developed at the University of Cambridge Computer
32 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
41 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
76 * our own global mutex for struct ifnet. Non-ideal, but should help in the
124 d->bd_label = mac_bpfdesc_label_alloc(); in mac_bpfdesc_init()
126 d->bd_label = NULL; in mac_bpfdesc_init()
204 if (d->bd_label != NULL) { in mac_bpfdesc_destroy()
205 mac_bpfdesc_label_free(d->bd_label); in mac_bpfdesc_destroy()
206 d->bd_label = NULL; in mac_bpfdesc_destroy()
303 int locked; in mac_ifnet_create() local
308 MAC_IFNET_LOCK(ifp, locked); in mac_ifnet_create()
310 MAC_IFNET_UNLOCK(ifp, locked); in mac_ifnet_create()
317 MAC_POLICY_PERFORM_NOSLEEP(bpfdesc_create, cred, d, d->bd_label); in mac_bpfdesc_create()
333 MAC_POLICY_PERFORM_NOSLEEP(bpfdesc_create_mbuf, d, d->bd_label, m, in mac_bpfdesc_create_mbuf()
341 int locked; in mac_ifnet_create_mbuf_impl() local
345 MAC_IFNET_LOCK(ifp, locked); in mac_ifnet_create_mbuf_impl()
348 MAC_IFNET_UNLOCK(ifp, locked); in mac_ifnet_create_mbuf_impl()
357 int error, locked; in mac_bpfdesc_check_receive() local
365 MAC_IFNET_LOCK(ifp, locked); in mac_bpfdesc_check_receive()
366 MAC_POLICY_CHECK_NOSLEEP(bpfdesc_check_receive, d, d->bd_label, ifp, in mac_bpfdesc_check_receive()
369 MAC_IFNET_UNLOCK(ifp, locked); in mac_bpfdesc_check_receive()
381 int error, locked; in mac_ifnet_check_transmit_impl() local
387 MAC_IFNET_LOCK(ifp, locked); in mac_ifnet_check_transmit_impl()
391 MAC_IFNET_UNLOCK(ifp, locked); in mac_ifnet_check_transmit_impl()
403 int error, locked; in mac_ifnet_ioctl_get() local
425 MAC_IFNET_LOCK(ifp, locked); in mac_ifnet_ioctl_get()
427 MAC_IFNET_UNLOCK(ifp, locked); in mac_ifnet_ioctl_get()
446 int error, locked; in mac_ifnet_ioctl_set() local
485 MAC_IFNET_LOCK(ifp, locked); in mac_ifnet_ioctl_set()
489 MAC_IFNET_UNLOCK(ifp, locked); in mac_ifnet_ioctl_set()
496 MAC_IFNET_UNLOCK(ifp, locked); in mac_ifnet_ioctl_set()