rem: if (atomic_set((int32 *)lock, 1) != 0) { panic("acquire_spinlock: attempt to acquire lock %p twice on non-SMP system (last caller: %p)\n", lock, find_lock_caller(lock));
add: oldValue = atomic_set((int32 *)lock, 1); if (oldValue != 0) { panic("acquire_spinlock: attempt to acquire lock %p twice on non-SMP system (last caller: %p, value %ld)\n", lock, find_lock_caller(lock), oldValue);
context: acquire_spinlock(spinlock *lock){	if (smp_num_cpus > 1) {		int curr_cpu = smp_get_current_cpu();		if (are_interrupts_enabled())			panic("acquire_spinlock: attempt to acquire lock %p with interrupts enabled\n", lock);		while (1) {			while (*lock != 0) {				smp_process_pending_ici(curr_cpu);				PAUSE();			}			if (atomic_set((int32 *)lock, 1) == 0)				break;		}	} else {#if DEBUG_SPINLOCKS		if (are_interrupts_enabled())			panic("acquire_spinlock: attempt to acquire lock %p with interrupts enabled\n", lock);		if (atomic_set((int32 *)lock, 1) != 0) {			panic("acquire_spinlock: attempt to acquire lock %p twice on non-SMP system (last caller: %p)\n", 				lock, find_lock_caller(lock));		}		push_lock_caller(arch_get_caller(), lock);#endif	}}