extern char **environ;
-enum BSDType {
- target_freebsd,
- target_netbsd,
- target_openbsd,
-};
-extern enum BSDType bsd_type;
-
#include "exec/user/thunk.h"
#include "target_arch.h"
#include "syscall_defs.h"
struct bsd_binprm *bprm;
struct image_info *info;
+ struct emulated_sigtable sync_signal;
+ /*
+ * TODO: Since we block all signals while returning to the main CPU
+ * loop, this needn't be an array
+ */
struct emulated_sigtable sigtab[TARGET_NSIG];
/*
* Nonzero if process_pending_signals() needs to do something (either
* from multiple threads.)
*/
int signal_pending;
+ /* True if we're leaving a sigsuspend and sigsuspend_mask is valid. */
+ bool in_sigsuspend;
/*
* This thread's signal mask, as requested by the guest program.
* The actual signal mask of this thread may differ:
* + sometimes we block all signals to avoid races
*/
sigset_t signal_mask;
+ /*
+ * The signal mask imposed by a guest sigsuspend syscall, if we are
+ * currently in the middle of such a syscall
+ */
+ sigset_t sigsuspend_mask;
- uint8_t stack[];
+ /* This thread's sigaltstack, if it has one */
+ struct target_sigaltstack sigaltstack_used;
} __attribute__((aligned(16))) TaskState;
void stop_all_tasks(void);