diff options
author | cp <cp@FreeBSD.org> | 2000-09-17 13:26:25 +0000 |
---|---|---|
committer | cp <cp@FreeBSD.org> | 2000-09-17 13:26:25 +0000 |
commit | 95ec42afde6869492a2af5d4d2e80b7d5dbf3448 (patch) | |
tree | 35a788fcb4e3aec0c989ad7fcd128aa0a1fff1da /sys/pci/if_fxpvar.h | |
parent | 10844db3a7dab0b5f067e69e28ea6c590e58dfe5 (diff) | |
download | FreeBSD-src-95ec42afde6869492a2af5d4d2e80b7d5dbf3448.zip FreeBSD-src-95ec42afde6869492a2af5d4d2e80b7d5dbf3448.tar.gz |
Add locking to make able to run without the Giant lock being held. This
is enabling as all entries are still called with Giant being held.
Maintaining compatability with NetBSD makes what should be very simple
kinda ugly.
Reviewed by: Jason Evans
Diffstat (limited to 'sys/pci/if_fxpvar.h')
-rw-r--r-- | sys/pci/if_fxpvar.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/pci/if_fxpvar.h b/sys/pci/if_fxpvar.h index 7ef7149..8a0353b 100644 --- a/sys/pci/if_fxpvar.h +++ b/sys/pci/if_fxpvar.h @@ -48,6 +48,7 @@ struct fxp_softc { struct resource *mem; /* resource descriptor for registers */ struct resource *irq; /* resource descriptor for interrupt */ void *ih; /* interrupt handler cookie */ + struct mtx sc_mtx; #endif /* __NetBSD__ */ bus_space_tag_t sc_st; /* bus space tag */ bus_space_handle_t sc_sh; /* bus space handle */ @@ -92,6 +93,9 @@ struct fxp_softc { #define FXP_INTR_TYPE int #define FXP_IOCTLCMD_TYPE u_long #define FXP_BPFTAP_ARG(ifp) (ifp)->if_bpf +#define FXP_SPLVAR(x) int x; +#define FXP_LOCK(sc, x) x = splimp() +#define FXP_UNLOCK(sc, x) splx(x) #else /* __FreeBSD__ */ #define sc_if arpcom.ac_if #define FXP_FORMAT "fxp%d" @@ -99,4 +103,7 @@ struct fxp_softc { #define FXP_INTR_TYPE void #define FXP_IOCTLCMD_TYPE u_long #define FXP_BPFTAP_ARG(ifp) ifp +#define FXP_SPLVAR(s) +#define FXP_LOCK(_sc, x) mtx_enter(&(_sc)->sc_mtx, MTX_DEF) +#define FXP_UNLOCK(_sc, x) mtx_exit(&(_sc)->sc_mtx, MTX_DEF) #endif /* __NetBSD__ */ |