Suspend process waiting for keyboard input
All checks were successful
Build documentation / build-and-deploy (push) Successful in 1m35s

This commit is contained in:
2026-02-15 15:21:18 +01:00
parent 60f201ab55
commit 0f5bd48328
14 changed files with 87 additions and 45 deletions

View File

@@ -211,9 +211,14 @@ DEFINE_SYSCALL (sys_device_do) {
if (device == NULL)
return SYSRESULT (-ST_NOT_FOUND);
int ret;
spin_lock (&device->lock);
int ret = device->ops[cmd](proc, (void*)ka1, (void*)ka2, (void*)ka3, (void*)ka4);
if (device->ops[cmd](proc, reschedule_cpu, &ret, (void*)ka1, (void*)ka2, (void*)ka3,
(void*)ka4) == PROC_NEED_RESCHEDULE) {
*reschedule = true;
}
spin_unlock (&device->lock);