PS/2 kb allow only one suspended proc at a time
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m19s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m19s
This commit is contained in:
@@ -215,8 +215,18 @@ int ps2kb_read_key (struct device* device, struct device_op_ctx* op_ctx, void* a
|
||||
|
||||
/* didn't pop anything */
|
||||
if (prev_count == new_count) {
|
||||
spin_lock (&ps2kb_sq.lock);
|
||||
struct list_node_link* node = ps2kb_sq.proc_list;
|
||||
spin_unlock (&ps2kb_sq.lock);
|
||||
|
||||
if (node != NULL) {
|
||||
spin_unlock (&ps2kb_ringbuffer_lock);
|
||||
return -ST_PERMISSION_ERROR;
|
||||
}
|
||||
|
||||
*op_ctx->reschedule =
|
||||
proc_sq_suspend (op_ctx->proc, &ps2kb_sq, &ps2kb_ringbuffer_lock, op_ctx->reschedule_cpu);
|
||||
|
||||
return ST_OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user