| 56 | } |
| 57 | |
| 58 | void MutexRP::lock() { |
| 59 | FL_ASSERT(mSpinlock != nullptr, "MutexRP::lock() called on null mutex"); |
| 60 | |
| 61 | spin_lock_t* spinlock = static_cast<spin_lock_t*>(mSpinlock); |
| 62 | |
| 63 | // Block until we acquire the spinlock |
| 64 | u32 save = spin_lock_blocking(spinlock); |
| 65 | |
| 66 | // Mark as locked and record owner |
| 67 | mLocked = true; |
| 68 | mOwnerCore = get_core_num(); |
| 69 | |
| 70 | // Keep the spinlock locked - it will be released in unlock() |
| 71 | // Note: We store the interrupt state to restore it later |
| 72 | // For now, we just use the spinlock directly as a mutex |
| 73 | (void)save; // Suppress unused variable warning |
| 74 | } |
| 75 | |
| 76 | void MutexRP::unlock() { |
| 77 | FL_ASSERT(mSpinlock != nullptr, "MutexRP::unlock() called on null mutex"); |
no outgoing calls
no test coverage detected