diff options
author | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-05-31 16:11:38 +0000 |
---|---|---|
committer | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-05-31 16:11:38 +0000 |
commit | 624f7979058b84cbf81c76d45f302ce757b213ca (patch) | |
tree | f226ad71b17a623c4bd4eefdfeceb15fbb71b765 /linux-user/qemu.h | |
parent | Fix usermode build. (diff) | |
download | qemu-kvm-624f7979058b84cbf81c76d45f302ce757b213ca.tar.gz qemu-kvm-624f7979058b84cbf81c76d45f302ce757b213ca.tar.bz2 qemu-kvm-624f7979058b84cbf81c76d45f302ce757b213ca.zip |
Make signal queues per thread.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4635 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user/qemu.h')
-rw-r--r-- | linux-user/qemu.h | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/linux-user/qemu.h b/linux-user/qemu.h index cc44c9a19..8b114954f 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h @@ -82,6 +82,20 @@ struct vm86_saved_state { #include "nwfpe/fpa11.h" #endif +#define MAX_SIGQUEUE_SIZE 1024 + +struct sigqueue { + struct sigqueue *next; + target_siginfo_t info; +}; + +struct emulated_sigtable { + int pending; /* true if signal is pending */ + struct sigqueue *first; + struct sigqueue info; /* in order to always have memory for the + first signal, we put it here */ +}; + /* NOTE: we force a big alignment so that the stack stored after is aligned too */ typedef struct TaskState { @@ -109,10 +123,16 @@ typedef struct TaskState { #endif int used; /* non zero if used */ struct image_info *info; + + struct emulated_sigtable sigtab[TARGET_NSIG]; + struct sigqueue sigqueue_table[MAX_SIGQUEUE_SIZE]; /* siginfo queue */ + struct sigqueue *first_free; /* first free siginfo queue entry */ + int signal_pending; /* non zero if a signal may be pending */ + uint8_t stack[0]; } __attribute__((aligned(16))) TaskState; -extern TaskState *first_task_state; +void init_task_state(TaskState *ts); extern const char *qemu_uname_release; /* ??? See if we can avoid exposing so much of the loader internals. */ @@ -182,9 +202,9 @@ void print_syscall_ret(int num, abi_long arg1); extern int do_strace; /* signal.c */ -void process_pending_signals(void *cpu_env); +void process_pending_signals(CPUState *cpu_env); void signal_init(void); -int queue_signal(int sig, target_siginfo_t *info); +int queue_signal(CPUState *env, int sig, target_siginfo_t *info); void host_to_target_siginfo(target_siginfo_t *tinfo, const siginfo_t *info); void target_to_host_siginfo(siginfo_t *info, const target_siginfo_t *tinfo); int target_to_host_signal(int sig); |