From e6c5ed2c7f9b463833a6592c892ff2920fc88502 Mon Sep 17 00:00:00 2001
From: Flavio Cruz <flaviocruz@gmail.com>
Date: Sun, 11 Dec 2022 01:51:18 -0500
Subject: Delete thread_get_state_KERNEL and thread_set_state_KERNEL

These are not used.

Message-Id: <Y5V95ibk9Z+3OJxN@jupiter.tail36e24.ts.net>
---
 kern/ipc_mig.c | 41 -----------------------------------------
 1 file changed, 41 deletions(-)

(limited to 'kern/ipc_mig.c')

diff --git a/kern/ipc_mig.c b/kern/ipc_mig.c
index 611ccee9..7ed12faa 100644
--- a/kern/ipc_mig.c
+++ b/kern/ipc_mig.c
@@ -563,47 +563,6 @@ port_name_to_space(mach_port_name_t name)
     }
 }
 
-/*
- * Hack to translate a thread port to a thread pointer for calling
- * thread_get_state and thread_set_state.  This is only necessary
- * because the IPC message for these two operations overflows the
- * kernel stack.
- *
- * AARGH!
- */
-
-kern_return_t thread_get_state_KERNEL(
-	mach_port_name_t	thread_port,	/* port right for thread */
-	int		flavor,
-	thread_state_t	old_state,	/* pointer to OUT array */
-	natural_t	*old_state_count)	/* IN/OUT */
-{
-	thread_t	thread;
-	kern_return_t	result;
-
-	thread = port_name_to_thread(thread_port);
-	result = thread_get_state(thread, flavor, old_state, old_state_count);
-	thread_deallocate(thread);
-
-	return result;
-}
-
-kern_return_t thread_set_state_KERNEL(
-	mach_port_t	thread_port,	/* port right for thread */
-	int		flavor,
-	thread_state_t	new_state,
-	natural_t	new_state_count)
-{
-	thread_t	thread;
-	kern_return_t	result;
-
-	thread = port_name_to_thread(thread_port);
-	result = thread_set_state(thread, flavor, new_state, new_state_count);
-	thread_deallocate(thread);
-
-	return result;
-}
-
 /*
  *	Things to keep in mind:
  *
-- 
cgit v1.2.3