*
*/
#if (!defined(TARGET_I386))
-typedef int64_t target_freebsd_time_t;
+typedef int64_t target_time_t;
#else
-typedef int32_t target_freebsd_time_t;
+typedef int32_t target_time_t;
#endif
struct target_iovec {
/* compare to sys/timespec.h */
struct target_freebsd_timespec {
- target_freebsd_time_t tv_sec; /* seconds */
+ target_time_t tv_sec; /* seconds */
abi_long tv_nsec; /* and nanoseconds */
#if !defined(TARGET_I386) && TARGET_ABI_BITS == 32
abi_long _pad;
};
struct target_freebsd_timeval {
- target_freebsd_time_t tv_sec; /* seconds */
+ target_time_t tv_sec; /* seconds */
target_freebsd_suseconds_t tv_usec;/* and microseconds */
#if !defined(TARGET_I386) && TARGET_ABI_BITS == 32
abi_long _pad;
/*
* sys/resource.h
*/
-#if defined(__FreeBSD__)
#define TARGET_RLIM_INFINITY RLIM_INFINITY
-#else
-#define TARGET_RLIM_INFINITY ((abi_ulong)-1)
-#endif
#define TARGET_RLIMIT_CPU 0
#define TARGET_RLIMIT_FSIZE 1
int32_t l_sysid;
} QEMU_PACKED;
+/* sys/unistd.h */
+/* 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) \
{ \
return safe_syscall(SYS_##name, arg1, arg2, arg3, arg4, arg5, arg6); \
}
+#define safe_fcntl(...) safe_syscall(SYS_fcntl, __VA_ARGS__)
+
/* So far all target and host bitmasks are the same */
#undef target_to_host_bitmask
#define target_to_host_bitmask(x, tbl) (x)