bsd-user: Define procctl(2) related structs
Implement procctl flags and related structs: struct target_procctl_reaper_status struct target_procctl_reaper_pidinfo struct target_procctl_reaper_pids struct target_procctl_reaper_kill Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Warner Losh <imp@bsdimp.com> Message-Id: <20230925182425.3163-3-kariem.taha2.7@gmail.com>
This commit is contained in:
parent
5783a53016
commit
d314ae93f1
@ -390,6 +390,48 @@ struct target_freebsd_flock {
|
||||
/* user: vfork(2) semantics, clear signals */
|
||||
#define TARGET_RFSPAWN (1U << 31)
|
||||
|
||||
/*
|
||||
* from sys/procctl.h
|
||||
*/
|
||||
#define TARGET_PROC_SPROTECT 1
|
||||
#define TARGET_PROC_REAP_ACQUIRE 2
|
||||
#define TARGET_PROC_REAP_RELEASE 3
|
||||
#define TARGET_PROC_REAP_STATUS 4
|
||||
#define TARGET_PROC_REAP_GETPIDS 5
|
||||
#define TARGET_PROC_REAP_KILL 6
|
||||
|
||||
struct target_procctl_reaper_status {
|
||||
uint32_t rs_flags;
|
||||
uint32_t rs_children;
|
||||
uint32_t rs_descendants;
|
||||
uint32_t rs_reaper;
|
||||
uint32_t rs_pid;
|
||||
uint32_t rs_pad0[15];
|
||||
};
|
||||
|
||||
struct target_procctl_reaper_pidinfo {
|
||||
uint32_t pi_pid;
|
||||
uint32_t pi_subtree;
|
||||
uint32_t pi_flags;
|
||||
uint32_t pi_pad0[15];
|
||||
};
|
||||
|
||||
struct target_procctl_reaper_pids {
|
||||
uint32_t rp_count;
|
||||
uint32_t rp_pad0[15];
|
||||
abi_ulong rp_pids;
|
||||
};
|
||||
|
||||
struct target_procctl_reaper_kill {
|
||||
int32_t rk_sig;
|
||||
uint32_t rk_flags;
|
||||
uint32_t rk_subtree;
|
||||
uint32_t rk_killed;
|
||||
uint32_t rk_fpid;
|
||||
uint32_t rk_pad0[15];
|
||||
};
|
||||
|
||||
|
||||
#define safe_syscall0(type, name) \
|
||||
type safe_##name(void) \
|
||||
{ \
|
||||
|
Loading…
Reference in New Issue
Block a user