if_snvar.h (149095) | if_snvar.h (150183) |
---|---|
1/*- 2 * Copyright (c) 1999 M. Warner Losh <imp@village.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 8 unchanged lines hidden (view full) --- 17 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * | 1/*- 2 * Copyright (c) 1999 M. Warner Losh <imp@village.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 8 unchanged lines hidden (view full) --- 17 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * |
25 * $FreeBSD: head/sys/dev/sn/if_snvar.h 149095 2005-08-15 17:20:34Z imp $ | 25 * $FreeBSD: head/sys/dev/sn/if_snvar.h 150183 2005-09-15 19:34:12Z ru $ |
26 */ 27 28#ifndef _IF_SNVAR_H 29#define _IF_SNVAR_H 30 31#include <net/if_arp.h> 32 33struct sn_softc { --- 36 unchanged lines hidden (view full) --- 70#define CSR_READ_MULTI_2(sc, off, addr, count) \ 71 bus_space_read_multi_2(sc->bst, sc->bsh, off, addr, count) 72 73#define SN_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) 74#define SN_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) 75#define SN_LOCK_INIT(_sc) \ 76 mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->dev), \ 77 MTX_NETWORK_LOCK, MTX_DEF) | 26 */ 27 28#ifndef _IF_SNVAR_H 29#define _IF_SNVAR_H 30 31#include <net/if_arp.h> 32 33struct sn_softc { --- 36 unchanged lines hidden (view full) --- 70#define CSR_READ_MULTI_2(sc, off, addr, count) \ 71 bus_space_read_multi_2(sc->bst, sc->bsh, off, addr, count) 72 73#define SN_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) 74#define SN_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) 75#define SN_LOCK_INIT(_sc) \ 76 mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->dev), \ 77 MTX_NETWORK_LOCK, MTX_DEF) |
78#define SN_LOCK_DESTORY(_sc) mtx_destroy(&_sc->sc_mtx); | 78#define SN_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx); |
79#define SN_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED); 80#define SN_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED); 81 82#endif /* _IF_SNVAR_H */ | 79#define SN_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED); 80#define SN_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED); 81 82#endif /* _IF_SNVAR_H */ |