Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions arch/lkl/include/uapi/asm/host_ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);

Expand Down
6 changes: 0 additions & 6 deletions tools/lkl/lib/nt-host.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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,
};
Expand Down
10 changes: 0 additions & 10 deletions tools/lkl/lib/posix-host.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down
15 changes: 0 additions & 15 deletions tools/lkl/tests/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
Loading