fix conflicts when merging no-thread to master

This commit is contained in:
Nguyen Anh Quynh
2016-04-23 10:06:57 +08:00
32 changed files with 27 additions and 322 deletions

View File

@ -71,15 +71,6 @@ extern int daemon(int, int);
#include <sys/sysctl.h>
#endif
int qemu_get_thread_id(void)
{
#if defined(__linux__)
return syscall(SYS_gettid);
#else
return getpid();
#endif
}
int qemu_daemon(int nochdir, int noclose)
{
return daemon(nochdir, noclose);

View File

@ -37,7 +37,6 @@
#include <stdlib.h>
#include "config-host.h"
#include "sysemu/sysemu.h"
#include "qemu/main-loop.h"
// #include "trace.h"
//#include "qemu/sockets.h"
@ -167,11 +166,6 @@ int qemu_gettimeofday(qemu_timeval *tp)
return 0;
}
int qemu_get_thread_id(void)
{
return GetCurrentThreadId();
}
char *
qemu_get_local_state_pathname(const char *relative_pathname)
{

View File

@ -426,16 +426,6 @@ int qemu_thread_create(struct uc_struct *uc, QemuThread *thread, const char *nam
return 0;
}
void qemu_thread_get_self(struct uc_struct *uc, QemuThread *thread)
{
thread->thread = pthread_self();
}
bool qemu_thread_is_self(QemuThread *thread)
{
return pthread_equal(pthread_self(), thread->thread);
}
void qemu_thread_exit(struct uc_struct *uc, void *retval)
{
pthread_exit(retval);

View File

@ -361,12 +361,6 @@ int qemu_thread_create(struct uc_struct *uc, QemuThread *thread, const char *nam
return 0;
}
void qemu_thread_get_self(struct uc_struct *uc, QemuThread *thread)
{
thread->data = uc->qemu_thread_data;
thread->tid = GetCurrentThreadId();
}
HANDLE qemu_thread_get_handle(QemuThread *thread)
{
QemuThreadData *data;
@ -388,8 +382,3 @@ HANDLE qemu_thread_get_handle(QemuThread *thread)
LeaveCriticalSection(&data->cs);
return handle;
}
bool qemu_thread_is_self(QemuThread *thread)
{
return GetCurrentThreadId() == thread->tid;
}