From owner-svn-src-all@FreeBSD.ORG Fri Nov 16 06:29:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D8433FA5; Fri, 16 Nov 2012 06:29:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B18768FC08; Fri, 16 Nov 2012 06:29:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAG6TqPO032576; Fri, 16 Nov 2012 06:29:52 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAG6Tqq1032573; Fri, 16 Nov 2012 06:29:52 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201211160629.qAG6Tqq1032573@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 16 Nov 2012 06:29:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243135 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 06:29:52 -0000 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