MCPcopy Create free account
hub / github.com/FastLED/FastLED / lock

Method lock

src/platforms/arm/rp/mutex_rp.cpp.hpp:58–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58void 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
76void MutexRP::unlock() {
77 FL_ASSERT(mSpinlock != nullptr, "MutexRP::unlock() called on null mutex");

Callers 9

addComponentMethod · 0.45
processPendingUpdatesMethod · 0.45
getComponentsMethod · 0.45
removeJsonUiComponentFunction · 0.45
ClocklessControllerClass · 0.45
run_next_jobMethod · 0.45
CoroutineRunnerImplClass · 0.45
lock_guardMethod · 0.45
unique_lockClass · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected