Author: ae Date: Tue Jun 19 10:34:45 2018 New Revision: 335362 URL: https://svnweb.freebsd.org/changeset/base/335362
Log: Move BPFIF_* macro definitions into .c file, where struct bpf_if is declared. They are only used in this file and there is no need to export them via bpfdesc.h. Modified: head/sys/net/bpf.c head/sys/net/bpfdesc.h Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Tue Jun 19 05:28:14 2018 (r335361) +++ head/sys/net/bpf.c Tue Jun 19 10:34:45 2018 (r335362) @@ -117,6 +117,11 @@ struct bpf_if { CTASSERT(offsetof(struct bpf_if, bif_ext) == 0); +#define BPFIF_RLOCK(bif) rw_rlock(&(bif)->bif_lock) +#define BPFIF_RUNLOCK(bif) rw_runlock(&(bif)->bif_lock) +#define BPFIF_WLOCK(bif) rw_wlock(&(bif)->bif_lock) +#define BPFIF_WUNLOCK(bif) rw_wunlock(&(bif)->bif_lock) + #if defined(DEV_BPF) || defined(NETGRAPH_BPF) #define PRINET 26 /* interruptible */ Modified: head/sys/net/bpfdesc.h ============================================================================== --- head/sys/net/bpfdesc.h Tue Jun 19 05:28:14 2018 (r335361) +++ head/sys/net/bpfdesc.h Tue Jun 19 10:34:45 2018 (r335362) @@ -152,11 +152,6 @@ struct xbpf_d { u_int64_t bd_spare[4]; }; -#define BPFIF_RLOCK(bif) rw_rlock(&(bif)->bif_lock) -#define BPFIF_RUNLOCK(bif) rw_runlock(&(bif)->bif_lock) -#define BPFIF_WLOCK(bif) rw_wlock(&(bif)->bif_lock) -#define BPFIF_WUNLOCK(bif) rw_wunlock(&(bif)->bif_lock) - #define BPFIF_FLAG_DYING 1 /* Reject new bpf consumers */ #endif _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"