import Unicorn2

This commit is contained in:
Nguyen Anh Quynh
2021-10-03 22:14:44 +08:00
parent 772558119a
commit aaaea14214
837 changed files with 368717 additions and 200912 deletions

View File

@ -12,18 +12,9 @@
*/
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <time.h>
#include <signal.h>
#include "unicorn/platform.h"
#include <string.h>
#include <limits.h>
#ifdef __linux__
#include <sys/syscall.h>
#include <linux/futex.h>
#endif
#include "qemu/thread.h"
#include "qemu/atomic.h"
static void error_exit(int err, const char *msg)
{
@ -35,7 +26,9 @@ int qemu_thread_create(struct uc_struct *uc, QemuThread *thread, const char *nam
void *(*start_routine)(void*),
void *arg, int mode)
{
#ifndef __MINGW32__
sigset_t set, oldset;
#endif
int err;
pthread_attr_t attr;
@ -52,8 +45,9 @@ int qemu_thread_create(struct uc_struct *uc, QemuThread *thread, const char *nam
}
}
/* Leave signal handling to the iothread. */
#ifndef __MINGW32__
sigfillset(&set);
#endif
pthread_sigmask(SIG_SETMASK, &set, &oldset);
err = pthread_create(&thread->thread, &attr, start_routine, arg);
if (err) {