From 1ff0321400e5407995dd37bdb252dfa14cae0a9b Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Sat, 17 Mar 2012 15:14:42 +0100 Subject: [PATCH] Added a stub for Syscall::Yield() which is used by broken code. The whole system call interface is currently stupid. --- sortix/syscall.cpp | 6 ++++++ sortix/syscall.h | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/sortix/syscall.cpp b/sortix/syscall.cpp index 6f8a1368..09698464 100644 --- a/sortix/syscall.cpp +++ b/sortix/syscall.cpp @@ -83,6 +83,12 @@ namespace Sortix Scheduler::Switch(regs); } + void Yield() + { + Panic("Syscall::Yield() is not implemented because it caused " + "instability and other issues."); + } + void AsIs() { system_was_incomplete = 1; diff --git a/sortix/syscall.h b/sortix/syscall.h index 70048aa5..e7fa5b6a 100644 --- a/sortix/syscall.h +++ b/sortix/syscall.h @@ -44,6 +44,11 @@ namespace Sortix // that its return value shall be discarded. void Incomplete(); + // Call this prior to Incomplete() to signal that the scheduler should + // go run something else for a moment. The current thread will not be + // marked as blocking. + void Yield(); + // For when you want the syscall exit code not to modify registers. void AsIs();