]> Git Repo - qemu.git/blobdiff - linux-user/qemu.h
spice-display: fix segfault in qemu_spice_create_update
[qemu.git] / linux-user / qemu.h
index e2717e077580ce339a373ac70964da6f2003a102..8012cc2f5b866fde4ce62d8dea969cfe5e7a02b4 100644 (file)
@@ -5,6 +5,7 @@
 #include <string.h>
 
 #include "cpu.h"
+#include "exec/cpu_ldst.h"
 
 #undef DEBUG_REMAP
 #ifdef DEBUG_REMAP
@@ -126,6 +127,7 @@ typedef struct TaskState {
 #endif
     uint32_t stack_base;
     int used; /* non zero if used */
+    bool sigsegv_blocked; /* SIGSEGV blocked by guest */
     struct image_info *info;
     struct linux_binprm *bprm;
 
@@ -178,10 +180,8 @@ int loader_exec(int fdexec, const char *filename, char **argv, char **envp,
              struct target_pt_regs * regs, struct image_info *infop,
              struct linux_binprm *);
 
-int load_elf_binary(struct linux_binprm * bprm, struct target_pt_regs * regs,
-                    struct image_info * info);
-int load_flt_binary(struct linux_binprm * bprm, struct target_pt_regs * regs,
-                    struct image_info * info);
+int load_elf_binary(struct linux_binprm *bprm, struct image_info *info);
+int load_flt_binary(struct linux_binprm *bprm, struct image_info *info);
 
 abi_long memcpy_to_target(abi_ulong dest, const void *src,
                           unsigned long len);
@@ -237,6 +237,7 @@ int host_to_target_signal(int sig);
 long do_sigreturn(CPUArchState *env);
 long do_rt_sigreturn(CPUArchState *env);
 abi_long do_sigaltstack(abi_ulong uss_addr, abi_ulong uoss_addr, abi_ulong sp);
+int do_sigprocmask(int how, const sigset_t *set, sigset_t *oldset);
 
 #ifdef TARGET_I386
 /* vm86.c */
@@ -298,7 +299,7 @@ static inline int access_ok(int type, abi_ulong addr, abi_ulong size)
    __builtin_choose_expr(sizeof(*(hptr)) == 2, stw_##e##_p,             \
    __builtin_choose_expr(sizeof(*(hptr)) == 4, stl_##e##_p,             \
    __builtin_choose_expr(sizeof(*(hptr)) == 8, stq_##e##_p, abort))))   \
-     ((hptr), (x)), 0)
+     ((hptr), (x)), (void)0)
 
 #define __get_user_e(x, hptr, e)                                        \
   ((x) = (typeof(*hptr))(                                               \
@@ -306,7 +307,7 @@ static inline int access_ok(int type, abi_ulong addr, abi_ulong size)
    __builtin_choose_expr(sizeof(*(hptr)) == 2, lduw_##e##_p,            \
    __builtin_choose_expr(sizeof(*(hptr)) == 4, ldl_##e##_p,             \
    __builtin_choose_expr(sizeof(*(hptr)) == 8, ldq_##e##_p, abort))))   \
-     (hptr)), 0)
+     (hptr)), (void)0)
 
 #ifdef TARGET_WORDS_BIGENDIAN
 # define __put_user(x, hptr)  __put_user_e(x, hptr, be)
@@ -325,9 +326,9 @@ static inline int access_ok(int type, abi_ulong addr, abi_ulong size)
 ({                                                                     \
     abi_ulong __gaddr = (gaddr);                                       \
     target_type *__hptr;                                               \
-    abi_long __ret;                                                    \
+    abi_long __ret = 0;                                                        \
     if ((__hptr = lock_user(VERIFY_WRITE, __gaddr, sizeof(target_type), 0))) { \
-        __ret = __put_user((x), __hptr);                               \
+        __put_user((x), __hptr);                               \
         unlock_user(__hptr, __gaddr, sizeof(target_type));             \
     } else                                                             \
         __ret = -TARGET_EFAULT;                                                \
@@ -338,9 +339,9 @@ static inline int access_ok(int type, abi_ulong addr, abi_ulong size)
 ({                                                                     \
     abi_ulong __gaddr = (gaddr);                                       \
     target_type *__hptr;                                               \
-    abi_long __ret;                                                    \
+    abi_long __ret = 0;                                                        \
     if ((__hptr = lock_user(VERIFY_READ, __gaddr, sizeof(target_type), 1))) { \
-        __ret = __get_user((x), __hptr);                               \
+        __get_user((x), __hptr);                               \
         unlock_user(__hptr, __gaddr, 0);                               \
     } else {                                                           \
         /* avoid warning */                                            \
This page took 0.033132 seconds and 4 git commands to generate.