mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-30 14:08:21 +00:00
tcp: initial implementation
This commit is contained in:
@@ -544,6 +544,7 @@ static void yield(context_t *context, void *) {
|
||||
}
|
||||
|
||||
int sched_yield() {
|
||||
__assert(_cpu()->ipl == IPL_NORMAL);
|
||||
bool sleeping = _cpu()->thread->flags & SCHED_THREAD_FLAGS_SLEEP;
|
||||
bool old = sleeping ? _cpu()->thread->sleepintstatus : interrupt_set(false);
|
||||
arch_context_saveandcall(yield, _cpu()->schedulerstack, NULL);
|
||||
|
||||
Reference in New Issue
Block a user