Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Nov 2012 06:29:52 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r243135 - head/sys/sys
Message-ID:  <201211160629.qAG6Tqq1032573@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Fri Nov 16 06:29:52 2012
New Revision: 243135
URL: http://svnweb.freebsd.org/changeset/base/243135

Log:
  Move the definition of the idtype_t from sys/types.h to sys/wait.h.
  Fix the bug, use #if __BSD_VISIBLE instead of #if defined(__BSD_VISIBLE),
  since __BSD_VISIBLE is always defined.
  Reformat the comments from the Solaris style to KNF.
  
  Reported and reviewed by:	bde
  MFC after:	28 days

Modified:
  head/sys/sys/syscallsubr.h
  head/sys/sys/types.h
  head/sys/sys/wait.h

Modified: head/sys/sys/syscallsubr.h
==============================================================================
--- head/sys/sys/syscallsubr.h	Fri Nov 16 06:25:20 2012	(r243134)
+++ head/sys/sys/syscallsubr.h	Fri Nov 16 06:29:52 2012	(r243135)
@@ -236,7 +236,7 @@ int	kern_utimesat(struct thread *td, int
 	    enum uio_seg pathseg, struct timeval *tptr, enum uio_seg tptrseg);
 int	kern_wait(struct thread *td, pid_t pid, int *status, int options,
 	    struct rusage *rup);
-int	kern_wait6(struct thread *td, idtype_t idtype, id_t id, int *status,
+int	kern_wait6(struct thread *td, enum idtype idtype, id_t id, int *status,
 	    int options, struct __wrusage *wrup, siginfo_t *sip);
 int	kern_writev(struct thread *td, int fd, struct uio *auio);
 int	kern_socketpair(struct thread *td, int domain, int type, int protocol,

Modified: head/sys/sys/types.h
==============================================================================
--- head/sys/sys/types.h	Fri Nov 16 06:25:20 2012	(r243134)
+++ head/sys/sys/types.h	Fri Nov 16 06:29:52 2012	(r243135)
@@ -141,46 +141,6 @@ typedef	__id_t		id_t;		/* can hold a uid
 #define	_ID_T_DECLARED
 #endif
 
-#ifndef _IDTYPE_T_DECLARED
-
-typedef enum
-#if defined(__BSD_VISIBLE)
-	idtype		/* pollutes XPG4.2 namespace */
-#endif
-		{
-	/*
-	 * These names were mostly lifted from Solaris source code and
-	 * still use Solaris style naming to avoid breaking any
-	 * OpenSolaris code which has been ported to FreeBSD.  There
-	 * is no clear FreeBSD counterpart for all of the names, but
-	 * some have a clear correspondence to FreeBSD entities.
-	 */
-	P_PID,		/* A process identifier.		*/
-	P_PPID,		/* A parent process identifier.		*/
-	P_PGID,		/* A process group identifier.		*/
-	P_SID,		/* A session identifier.		*/
-	P_CID,		/* A scheduling class identifier.	*/
-	P_UID,		/* A user identifier.			*/
-	P_GID,		/* A group identifier.			*/
-	P_ALL,		/* All processes.			*/
-	P_LWPID,	/* An LWP identifier.			*/
-	P_TASKID,	/* A task identifier.			*/
-	P_PROJID,	/* A project identifier.		*/
-	P_POOLID,	/* A pool identifier.			*/
-	P_JAILID,	/* A zone identifier.			*/
-	P_CTID,		/* A (process) contract identifier.	*/
-	P_CPUID,	/* CPU identifier.			*/
-	P_PSETID	/* Processor set identifier		*/
-} idtype_t;		/* The type of id_t we are using.	*/
-
-#if defined(__BSD_VISIBLE)
-#define	P_ZONEID	P_JAILID
-#endif
-
-#define	_IDTYPE_T_DECLARED
-#endif
-
-
 #ifndef _INO_T_DECLARED
 typedef	__ino_t		ino_t;		/* inode number */
 #define	_INO_T_DECLARED

Modified: head/sys/sys/wait.h
==============================================================================
--- head/sys/sys/wait.h	Fri Nov 16 06:25:20 2012	(r243134)
+++ head/sys/sys/wait.h	Fri Nov 16 06:29:52 2012	(r243135)
@@ -88,6 +88,46 @@
 #define	WLINUXCLONE 0x80000000	/* Wait for kthread spawned from linux_clone. */
 #endif
 
+#ifndef _IDTYPE_T_DECLARED
+typedef enum
+#if __BSD_VISIBLE
+	idtype		/* pollutes XPG4.2 namespace */
+#endif
+		{
+	/*
+	 * These names were mostly lifted from Solaris source code and
+	 * still use Solaris style naming to avoid breaking any
+	 * OpenSolaris code which has been ported to FreeBSD.  There
+	 * is no clear FreeBSD counterpart for all of the names, but
+	 * some have a clear correspondence to FreeBSD entities.
+	 *
+	 * The numerical values are kept synchronized with the Solaris
+	 * values.
+	 */
+	P_PID,			/* A process identifier. */
+	P_PPID,			/* A parent process identifier.	*/
+	P_PGID,			/* A process group identifier. */
+	P_SID,			/* A session identifier. */
+	P_CID,			/* A scheduling class identifier. */
+	P_UID,			/* A user identifier. */
+	P_GID,			/* A group identifier. */
+	P_ALL,			/* All processes. */
+	P_LWPID,		/* An LWP identifier. */
+	P_TASKID,		/* A task identifier. */
+	P_PROJID,		/* A project identifier. */
+	P_POOLID,		/* A pool identifier. */
+	P_JAILID,		/* A zone identifier. */
+	P_CTID,			/* A (process) contract identifier. */
+	P_CPUID,		/* CPU identifier. */
+	P_PSETID		/* Processor set identifier. */
+} idtype_t;			/* The type of id_t we are using. */
+
+#if __BSD_VISIBLE
+#define	P_ZONEID	P_JAILID
+#endif
+#define	_IDTYPE_T_DECLARED
+#endif
+
 /*
  * Tokens for special values of the "pid" parameter to wait4.
  * Extended struct __wrusage to collect rusage for both the target



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