mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 08:03:01 +09:00
Merge pull request #599 from lrh2000/no-gettid
lkl: Remove gettid from host_ops
This commit is contained in:
@@ -110,9 +110,6 @@ enum lkl_prot {
|
||||
* @iomem_acess - reads or writes to and I/O memory region; addr must be in the
|
||||
* range returned by ioremap
|
||||
*
|
||||
* @gettid - returns the host thread id of the caller, which need not
|
||||
* be the same as the handle returned by thread_create
|
||||
*
|
||||
* @jmp_buf_set - runs the give function and setups a jump back point by saving
|
||||
* the context in the jump buffer; jmp_buf_longjmp can be called from the give
|
||||
* function or any callee in that function to return back to the jump back
|
||||
@@ -177,8 +174,6 @@ struct lkl_host_operations {
|
||||
int (*iomem_access)(const volatile void *addr, void *val, int size,
|
||||
int write);
|
||||
|
||||
long (*gettid)(void);
|
||||
|
||||
void (*jmp_buf_set)(struct lkl_jmp_buf *jmpb, void (*f)(void));
|
||||
void (*jmp_buf_longjmp)(struct lkl_jmp_buf *jmpb, int val);
|
||||
|
||||
|
||||
@@ -241,11 +241,6 @@ static void print(const char *str, int len)
|
||||
write(1, str, len);
|
||||
}
|
||||
|
||||
static long gettid(void)
|
||||
{
|
||||
return GetCurrentThreadId();
|
||||
}
|
||||
|
||||
static void *mem_alloc(unsigned long size)
|
||||
{
|
||||
return malloc(size);
|
||||
@@ -281,7 +276,6 @@ struct lkl_host_operations lkl_host_ops = {
|
||||
.ioremap = lkl_ioremap,
|
||||
.iomem_access = lkl_iomem_access,
|
||||
.virtio_devices = lkl_virtio_devs,
|
||||
.gettid = gettid,
|
||||
.jmp_buf_set = jmp_buf_set,
|
||||
.jmp_buf_longjmp = jmp_buf_longjmp,
|
||||
};
|
||||
|
||||
@@ -448,15 +448,6 @@ static void panic(void)
|
||||
assert(0);
|
||||
}
|
||||
|
||||
static long _gettid(void)
|
||||
{
|
||||
#ifdef __FreeBSD__
|
||||
return (long)pthread_self();
|
||||
#else
|
||||
return syscall(SYS_gettid);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void *page_alloc(unsigned long size)
|
||||
{
|
||||
void *addr;
|
||||
@@ -607,7 +598,6 @@ struct lkl_host_operations lkl_host_ops = {
|
||||
.ioremap = lkl_ioremap,
|
||||
.iomem_access = lkl_iomem_access,
|
||||
.virtio_devices = lkl_virtio_devs,
|
||||
.gettid = _gettid,
|
||||
.jmp_buf_set = jmp_buf_set,
|
||||
.jmp_buf_longjmp = jmp_buf_longjmp,
|
||||
.memcpy = posix_memcpy,
|
||||
|
||||
@@ -385,20 +385,6 @@ static int lkl_test_semaphore(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int lkl_test_gettid(void)
|
||||
{
|
||||
long tid = lkl_host_ops.gettid();
|
||||
lkl_test_logf("%ld", tid);
|
||||
|
||||
/* As far as I know, thread IDs are non-zero on all reasonable
|
||||
* systems. */
|
||||
if (tid) {
|
||||
return TEST_SUCCESS;
|
||||
} else {
|
||||
return TEST_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
static void test_thread(void *data)
|
||||
{
|
||||
int *pipe_fds = (int*) data;
|
||||
@@ -753,7 +739,6 @@ struct lkl_test tests[] = {
|
||||
LKL_TEST(chdir_root),
|
||||
LKL_TEST(umount_fs_proc),
|
||||
LKL_TEST(lo_ifup),
|
||||
LKL_TEST(gettid),
|
||||
LKL_TEST(syscall_thread),
|
||||
/*
|
||||
* Wine has an issue where the FlsCallback is not called when
|
||||
|
||||
Reference in New Issue
Block a user