Use a big-lock for kernel sychronization instead of fine-grained locking
This commit is contained in:
@@ -14,17 +14,13 @@ DEFINE_DEVICE_INIT(debugconsole_init) {
|
||||
DEFINE_DEVICE_FINI(debugconsole_fini) {}
|
||||
|
||||
DEFINE_DEVICE_OP(debugconsole_putstr) {
|
||||
uint64_t fp;
|
||||
|
||||
char* string = (char*)a1;
|
||||
size_t* len = (size_t*)a2;
|
||||
|
||||
if (string == NULL || len == NULL)
|
||||
return -ST_BAD_ADDRESS_SPACE;
|
||||
|
||||
spin_lock(&proc->lock, &fp);
|
||||
int pid = proc->pid;
|
||||
spin_unlock(&proc->lock, fp);
|
||||
|
||||
debugprintf("(CPU %d; PID %d) %.*s", thiscpu->id, pid, (int)*len, string);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user