Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Jan 2004 17:22:55 -0800 (PST)
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 44718 for review
Message-ID:  <200401030122.i031MtsM060414@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <sys/queue.h>			/* for TAILQ macros */
 #include <sys/selinfo.h>		/* for struct selinfo */
 #include <sys/_lock.h>
@@ -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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200401030122.i031MtsM060414>