mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-22 11:17:19 +00:00
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
This commit is contained in:
parent
43bdcf9335
commit
e2d55f4866
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=243135
@ -236,7 +236,7 @@ int kern_utimesat(struct thread *td, int fd, char *path,
|
||||
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,
|
||||
|
@ -141,46 +141,6 @@ typedef __id_t id_t; /* can hold a uid_t or pid_t */
|
||||
#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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user