if_llatbl.h (192476) | if_llatbl.h (196535) |
---|---|
1/* 2 * Copyright (c) 2004 Luigi Rizzo, Alessandro Cerri. All rights reserved. 3 * Copyright (c) 2004-2008 Qing Li. All rights reserved. 4 * Copyright (c) 2008 Kip Macy. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 11 unchanged lines hidden (view full) --- 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 2004 Luigi Rizzo, Alessandro Cerri. All rights reserved. 3 * Copyright (c) 2004-2008 Qing Li. All rights reserved. 4 * Copyright (c) 2008 Kip Macy. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 11 unchanged lines hidden (view full) --- 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/net/if_llatbl.h 192476 2009-05-20 21:07:15Z qingli $"); | 28__FBSDID("$FreeBSD: head/sys/net/if_llatbl.h 196535 2009-08-25 09:52:38Z rwatson $"); |
29 30#ifndef _NET_IF_LLATBL_H_ 31#define _NET_IF_LLATBL_H_ 32 33#include <sys/_rwlock.h> 34#include <netinet/in.h> 35 36struct ifnet; 37struct sysctl_req; 38struct rt_msghdr; 39struct rt_addrinfo; 40 41struct llentry; 42LIST_HEAD(llentries, llentry); 43 | 29 30#ifndef _NET_IF_LLATBL_H_ 31#define _NET_IF_LLATBL_H_ 32 33#include <sys/_rwlock.h> 34#include <netinet/in.h> 35 36struct ifnet; 37struct sysctl_req; 38struct rt_msghdr; 39struct rt_addrinfo; 40 41struct llentry; 42LIST_HEAD(llentries, llentry); 43 |
44extern struct rwlock lltable_rwlock; 45#define LLTABLE_RLOCK() rw_rlock(&lltable_rwlock) 46#define LLTABLE_RUNLOCK() rw_runlock(&lltable_rwlock) 47#define LLTABLE_WLOCK() rw_wlock(&lltable_rwlock) 48#define LLTABLE_WUNLOCK() rw_wunlock(&lltable_rwlock) 49#define LLTABLE_LOCK_ASSERT() rw_assert(&lltable_rwlock, RA_LOCKED) 50 |
|
44/* 45 * Code referencing llentry must at least hold 46 * a shared lock 47 */ 48struct llentry { 49 LIST_ENTRY(llentry) lle_next; 50 struct rwlock lle_lock; 51 struct lltable *lle_tbl; --- 148 unchanged lines hidden --- | 51/* 52 * Code referencing llentry must at least hold 53 * a shared lock 54 */ 55struct llentry { 56 LIST_ENTRY(llentry) lle_next; 57 struct rwlock lle_lock; 58 struct lltable *lle_tbl; --- 148 unchanged lines hidden --- |