rem: restore_interrupts(flags);
add: restore_interrupts(state);
context: remove_debugger_command(char * name, int (*func)(int, char **)){	struct debugger_command *cmd = commands;	struct debugger_command *prev = NULL;	int flags;	flags = disable_interrupts();	acquire_spinlock(&dbg_spinlock);	while (cmd) {		if (!strcmp(cmd->name, name) && cmd->func == func)			break;		prev = cmd;		cmd = cmd->next;	}	if (cmd) {		if (cmd == commands)			commands = cmd->next;		else			prev->next = cmd->next;	}	release_spinlock(&dbg_spinlock);	restore_interrupts(flags);	if (cmd) {		free(cmd);		return B_NO_ERROR;	}	return B_NAME_NOT_FOUND;}