| 1 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 2 | |
| 3 | #pragma once |
| 4 | |
| 5 | #include <mos/platform/platform.hpp> |
| 6 | |
| 7 | void kthread_init(void); |
| 8 | |
| 9 | /** |
| 10 | * @brief Create a kernel-mode thread. |
| 11 | * |
| 12 | * @param entry The entry point of the thread |
| 13 | * @param arg The argument to pass to the thread |
| 14 | * @param name The name of the thread |
| 15 | * @return Thread* The created thread |
| 16 | */ |
| 17 | Thread *kthread_create(thread_entry_t entry, void *arg, const char *name); |
| 18 | |
| 19 | /** |
| 20 | * @brief Create a kernel thread, but do not add it to the scheduler. |
| 21 | * |
| 22 | * @param entry The entry point of the thread |
| 23 | * @param arg The argument to pass to the thread |
| 24 | * @param name The name of the thread |
| 25 | * @return Thread* The created thread |
| 26 | */ |
| 27 | __nodiscard Thread *kthread_create_no_sched(thread_entry_t entry, void *arg, const char *name); |
| 28 | |