tcp: initial implementation

This commit is contained in:
Matheus
2024-06-03 22:02:58 -03:00
parent 7053ed68af
commit 7cad8f53f2
7 changed files with 1729 additions and 53 deletions
+1
View File
@@ -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);