From owner-p4-projects@FreeBSD.ORG Fri Jan 2 17:22:56 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 700F716A4D0; Fri, 2 Jan 2004 17:22:56 -0800 (PST) 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 4B85316A4CE for ; Fri, 2 Jan 2004 17:22:56 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B1B243D41 for ; Fri, 2 Jan 2004 17:22:55 -0800 (PST) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i031Mt0B060417 for ; Fri, 2 Jan 2004 17:22:55 -0800 (PST) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i031MtsM060414 for perforce@freebsd.org; Fri, 2 Jan 2004 17:22:55 -0800 (PST) (envelope-from sam@freebsd.org) Date: Fri, 2 Jan 2004 17:22:55 -0800 (PST) Message-Id: <200401030122.i031MtsM060414@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 44718 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: Sat, 03 Jan 2004 01:22:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=44718 Change 44718 by sam@sam_ebb on 2004/01/02 17:22:48 protect socket decl with ifdef _KERNEL; user apps can't grok the mutex in the sockbufs Affected files ... .. //depot/projects/netperf+sockets/sys/sys/socketvar.h#8 edit Differences ... ==== //depot/projects/netperf+sockets/sys/sys/socketvar.h#8 (text+ko) ==== @@ -37,6 +37,7 @@ #ifndef _SYS_SOCKETVAR_H_ #define _SYS_SOCKETVAR_H_ +#ifdef _KERNEL #include /* for TAILQ macros */ #include /* for struct selinfo */ #include @@ -152,6 +153,8 @@ #define SOCK_UNLOCK(_so) SOCKBUF_UNLOCK(&(_so)->so_rcv) #define SOCK_LOCK_ASSERT(_so) SOCKBUF_LOCK_ASSERT(&(_so)->so_rcv) +#endif /* _KERNEL */ + /* * Socket state bits. */ @@ -203,6 +206,7 @@ uid_t so_uid; /* XXX */ }; +#ifdef _KERNEL /* * Macros for sockets and socket buffering. */ @@ -328,8 +332,6 @@ sowakeup_locked((so), &(so)->so_snd); \ } while (0) -#ifdef _KERNEL - /* * Argument structure for sosetopt et seq. This is in the KERNEL * section because it will never be visible to user code.