diff --git a/arch/lkl/include/uapi/asm/host_ops.h b/arch/lkl/include/uapi/asm/host_ops.h index 09570ea2f548ba..319dac7629332f 100644 --- a/arch/lkl/include/uapi/asm/host_ops.h +++ b/arch/lkl/include/uapi/asm/host_ops.h @@ -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); diff --git a/tools/lkl/lib/nt-host.c b/tools/lkl/lib/nt-host.c index cf013f2b02b647..1d643da4168f9d 100644 --- a/tools/lkl/lib/nt-host.c +++ b/tools/lkl/lib/nt-host.c @@ -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, }; diff --git a/tools/lkl/lib/posix-host.c b/tools/lkl/lib/posix-host.c index 63d46b1fca949c..89fea03891bd8e 100644 --- a/tools/lkl/lib/posix-host.c +++ b/tools/lkl/lib/posix-host.c @@ -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, diff --git a/tools/lkl/tests/boot.c b/tools/lkl/tests/boot.c index b97dfd609261f9..a5eefc6b76d4ee 100644 --- a/tools/lkl/tests/boot.c +++ b/tools/lkl/tests/boot.c @@ -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