summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/include/thread.h5
-rw-r--r--src/lib/thread.c14
2 files changed, 3 insertions, 16 deletions
diff --git a/src/include/thread.h b/src/include/thread.h
index f9591c949f..7969f575fe 100644
--- a/src/include/thread.h
+++ b/src/include/thread.h
@@ -46,9 +46,8 @@ void threads_initialize(void);
*/
void *arch_get_thread_stackbase(void);
/* Run func(arrg) on a new thread. Return 0 on successful start of thread, < 0
- * when thread could not be started. Note that the thread will block the
- * current state in the boot state machine until it is complete. The thread
- * handle if populated, will reflect the state and return code of the thread.
+ * when thread could not be started. The thread handle if populated, will
+ * reflect the state and return code of the thread.
*/
int thread_run(struct thread_handle *handle, enum cb_err (*func)(void *), void *arg);
/* thread_run_until is the same as thread_run() except that it blocks state
diff --git a/src/lib/thread.c b/src/lib/thread.c
index a3ab2aa0cc..4d06021ea8 100644
--- a/src/lib/thread.c
+++ b/src/lib/thread.c
@@ -162,18 +162,6 @@ static void asmlinkage call_wrapper(void *unused)
terminate_thread(current, error);
}
-/* Block the current state transitions until thread is complete. */
-static void asmlinkage call_wrapper_block_current(void *unused)
-{
- struct thread *current = current_thread();
- enum cb_err error;
-
- boot_state_current_block();
- error = current->entry(current->entry_arg);
- boot_state_current_unblock();
- terminate_thread(current, error);
-}
-
struct block_boot_state {
boot_state_t state;
boot_state_sequence_t seq;
@@ -312,7 +300,7 @@ int thread_run(struct thread_handle *handle, enum cb_err (*func)(void *), void *
return -1;
}
- prepare_thread(t, handle, func, arg, call_wrapper_block_current, NULL);
+ prepare_thread(t, handle, func, arg, call_wrapper, NULL);
schedule(t);
return 0;