Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/user.h
Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | |||||
#endif | #endif | ||||
#ifndef _SYS_SIGNALVAR_H_ | #ifndef _SYS_SIGNALVAR_H_ | ||||
#include <sys/signalvar.h> | #include <sys/signalvar.h> | ||||
#endif | #endif | ||||
#ifndef _SYS_SOCKET_VAR_H_ | #ifndef _SYS_SOCKET_VAR_H_ | ||||
#include <sys/socket.h> | #include <sys/socket.h> | ||||
#endif | #endif | ||||
#include <sys/caprights.h> | #include <sys/caprights.h> | ||||
#include <sys/eventfd.h> | |||||
/* | /* | ||||
* KERN_PROC subtype ops return arrays of selected proc structure entries: | * KERN_PROC subtype ops return arrays of selected proc structure entries: | ||||
* | * | ||||
* This struct includes several arrays of spare space, with different arrays | * This struct includes several arrays of spare space, with different arrays | ||||
* for different standard C-types. When adding new variables to this struct, | * for different standard C-types. When adding new variables to this struct, | ||||
* the space for byte-aligned data should be taken from the ki_sparestring, | * the space for byte-aligned data should be taken from the ki_sparestring, | ||||
* pointers from ki_spareptrs, word-aligned data from ki_spareints, and | * pointers from ki_spareptrs, word-aligned data from ki_spareints, and | ||||
▲ Show 20 Lines • Show All 183 Lines • ▼ Show 20 Lines | |||||
#define KF_TYPE_KQUEUE 5 | #define KF_TYPE_KQUEUE 5 | ||||
#define KF_TYPE_CRYPTO 6 | #define KF_TYPE_CRYPTO 6 | ||||
#define KF_TYPE_MQUEUE 7 | #define KF_TYPE_MQUEUE 7 | ||||
#define KF_TYPE_SHM 8 | #define KF_TYPE_SHM 8 | ||||
#define KF_TYPE_SEM 9 | #define KF_TYPE_SEM 9 | ||||
#define KF_TYPE_PTS 10 | #define KF_TYPE_PTS 10 | ||||
#define KF_TYPE_PROCDESC 11 | #define KF_TYPE_PROCDESC 11 | ||||
#define KF_TYPE_DEV 12 | #define KF_TYPE_DEV 12 | ||||
#define KF_TYPE_EVENTFD 13 | |||||
#define KF_TYPE_UNKNOWN 255 | #define KF_TYPE_UNKNOWN 255 | ||||
#define KF_VTYPE_VNON 0 | #define KF_VTYPE_VNON 0 | ||||
#define KF_VTYPE_VREG 1 | #define KF_VTYPE_VREG 1 | ||||
#define KF_VTYPE_VDIR 2 | #define KF_VTYPE_VDIR 2 | ||||
#define KF_VTYPE_VBLK 3 | #define KF_VTYPE_VBLK 3 | ||||
#define KF_VTYPE_VCHR 4 | #define KF_VTYPE_VCHR 4 | ||||
#define KF_VTYPE_VLNK 5 | #define KF_VTYPE_VLNK 5 | ||||
▲ Show 20 Lines • Show All 156 Lines • ▼ Show 20 Lines | union { | ||||
/* Round to 64 bit alignment. */ | /* Round to 64 bit alignment. */ | ||||
uint32_t kf_pts_pad1[4]; | uint32_t kf_pts_pad1[4]; | ||||
} kf_pts; | } kf_pts; | ||||
struct { | struct { | ||||
uint32_t kf_spareint[4]; | uint32_t kf_spareint[4]; | ||||
uint64_t kf_spareint64[32]; | uint64_t kf_spareint64[32]; | ||||
pid_t kf_pid; | pid_t kf_pid; | ||||
} kf_proc; | } kf_proc; | ||||
struct { | |||||
eventfd_t kf_eventfd_value; | |||||
kib: I wonder if the contamination of the header with include of eventfd.h is worth it. IMO it is… | |||||
uint32_t kf_eventfd_flags; | |||||
} kf_eventfd; | |||||
} kf_un; | } kf_un; | ||||
}; | }; | ||||
uint16_t kf_status; /* Status flags. */ | uint16_t kf_status; /* Status flags. */ | ||||
uint16_t kf_pad1; /* Round to 32 bit alignment. */ | uint16_t kf_pad1; /* Round to 32 bit alignment. */ | ||||
int _kf_ispare0; /* Space for more stuff. */ | int _kf_ispare0; /* Space for more stuff. */ | ||||
cap_rights_t kf_cap_rights; /* Capability rights. */ | cap_rights_t kf_cap_rights; /* Capability rights. */ | ||||
uint64_t _kf_cap_spare; /* Space for future cap_rights_t. */ | uint64_t _kf_cap_spare; /* Space for future cap_rights_t. */ | ||||
/* Truncated before copyout in sysctl */ | /* Truncated before copyout in sysctl */ | ||||
▲ Show 20 Lines • Show All 169 Lines • Show Last 20 Lines |
I wonder if the contamination of the header with include of eventfd.h is worth it. IMO it is good enough to use uint64_t directly.