diff options
| author | Robert Watson <rwatson@FreeBSD.org> | 2005-08-16 09:15:14 +0000 |
|---|---|---|
| committer | Robert Watson <rwatson@FreeBSD.org> | 2005-08-16 09:15:14 +0000 |
| commit | 81dbb1a34e04f3106485e5b92111dbfbdc780017 (patch) | |
| tree | 954c2f56ad4c16ad861897adbc9cf669ab1e041c /sys/net | |
| parent | b5c803d41ec64bb6d7ff48c27f937bf8f032231c (diff) | |
Notes
Diffstat (limited to 'sys/net')
| -rw-r--r-- | sys/net/if_var.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/net/if_var.h b/sys/net/if_var.h index 4b0f4218f057..795a2012ef3b 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -179,6 +179,7 @@ struct ifnet { struct mtx if_afdata_mtx; struct task if_starttask; /* task for IFF_NEEDSGIANT */ struct task if_linktask; /* task for link change events */ + struct mtx if_addr_mtx; /* mutex to protect address lists */ }; typedef void if_init_f_t(void *); @@ -217,6 +218,16 @@ typedef void if_init_f_t(void *); #define if_list if_link /* + * Locks for address lists on the network interface. + */ +#define IF_ADDR_LOCK_INIT(if) mtx_init(&(if)->if_addr_mtx, \ + "if_addr_mtx", NULL, MTX_DEF) +#define IF_ADDR_LOCK_DESTROY(if) mtx_destroy(&(if)->if_addr_mtx) +#define IF_ADDR_LOCK(if) mtx_lock(&(if)->if_addr_mtx) +#define IF_ADDR_UNLOCK(if) mtx_unlock(&(if)->if_addr_mtx) +#define IF_ADDR_LOCK_ASSERT(if) mtx_assert(&(if)->if_addr_mtx, MA_OWNED) + +/* * Output queues (ifp->if_snd) and slow device input queues (*ifp->if_slowq) * are queues of messages stored on ifqueue structures * (defined above). Entries are added to and deleted from these structures |
