Suspend process waiting for keyboard input
All checks were successful
Build documentation / build-and-deploy (push) Successful in 1m35s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 1m35s
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user