From owner-p4-projects@FreeBSD.ORG Tue Oct 14 11:45:09 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 808A816A4C0; Tue, 14 Oct 2003 11:45:09 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 59EF216A4B3 for ; Tue, 14 Oct 2003 11:45:09 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D243143FBF for ; Tue, 14 Oct 2003 11:45:08 -0700 (PDT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h9EIj8XJ077824 for ; Tue, 14 Oct 2003 11:45:08 -0700 (PDT) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h9EIj8dP077820 for perforce@freebsd.org; Tue, 14 Oct 2003 11:45:08 -0700 (PDT) (envelope-from sam@freebsd.org) Date: Tue, 14 Oct 2003 11:45:08 -0700 (PDT) Message-Id: <200310141845.h9EIj8dP077820@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 39707 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Oct 2003 18:45:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=39707 Change 39707 by sam@sam_ebb on 2003/10/14 11:44:18 revert change to remove locking defines from user namespace; no need for this gratuitous difference right now Affected files ... .. //depot/projects/netperf/sys/netinet/in_pcb.h#6 edit Differences ... ==== //depot/projects/netperf/sys/netinet/in_pcb.h#6 (text+ko) ==== @@ -248,6 +248,19 @@ struct mtx ipi_mtx; }; +#define INP_LOCK_INIT(inp, d) \ + mtx_init(&(inp)->inp_mtx, (d), NULL, MTX_DEF | MTX_RECURSE | MTX_DUPOK) +#define INP_LOCK_DESTROY(inp) mtx_destroy(&(inp)->inp_mtx) +#define INP_LOCK(inp) mtx_lock(&(inp)->inp_mtx) +#define INP_UNLOCK(inp) mtx_unlock(&(inp)->inp_mtx) + +#define INP_INFO_LOCK_INIT(ipi, d) \ + mtx_init(&(ipi)->ipi_mtx, (d), NULL, MTX_DEF | MTX_RECURSE) +#define INP_INFO_RLOCK(ipi) mtx_lock(&(ipi)->ipi_mtx) +#define INP_INFO_WLOCK(ipi) mtx_lock(&(ipi)->ipi_mtx) +#define INP_INFO_RUNLOCK(ipi) mtx_unlock(&(ipi)->ipi_mtx) +#define INP_INFO_WUNLOCK(ipi) mtx_unlock(&(ipi)->ipi_mtx) + #define INP_PCBHASH(faddr, lport, fport, mask) \ (((faddr) ^ ((faddr) >> 16) ^ ntohs((lport) ^ (fport))) & (mask)) #define INP_PCBPORTHASH(lport, mask) \ @@ -306,19 +319,6 @@ #define INP_CHECK_SOCKAF(so, af) (INP_SOCKAF(so) == af) #ifdef _KERNEL -#define INP_LOCK_INIT(inp, d) \ - mtx_init(&(inp)->inp_mtx, (d), NULL, MTX_DEF | MTX_RECURSE | MTX_DUPOK) -#define INP_LOCK_DESTROY(inp) mtx_destroy(&(inp)->inp_mtx) -#define INP_LOCK(inp) mtx_lock(&(inp)->inp_mtx) -#define INP_UNLOCK(inp) mtx_unlock(&(inp)->inp_mtx) - -#define INP_INFO_LOCK_INIT(ipi, d) \ - mtx_init(&(ipi)->ipi_mtx, (d), NULL, MTX_DEF | MTX_RECURSE) -#define INP_INFO_RLOCK(ipi) mtx_lock(&(ipi)->ipi_mtx) -#define INP_INFO_WLOCK(ipi) mtx_lock(&(ipi)->ipi_mtx) -#define INP_INFO_RUNLOCK(ipi) mtx_unlock(&(ipi)->ipi_mtx) -#define INP_INFO_WUNLOCK(ipi) mtx_unlock(&(ipi)->ipi_mtx) - extern int ipport_lowfirstauto; extern int ipport_lowlastauto; extern int ipport_firstauto;