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

Method unlock

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

Source from the content-addressed store, hash-verified

74}
75
76void MutexRP::unlock() {
77 FL_ASSERT(mSpinlock != nullptr, "MutexRP::unlock() called on null mutex");
78 FL_ASSERT(mLocked, "MutexRP::unlock() called on unlocked mutex");
79 FL_ASSERT(mOwnerCore == get_core_num(), "MutexRP::unlock() called from different core than lock()");
80
81 spin_lock_t* spinlock = static_cast<spin_lock_t*>(mSpinlock);
82
83 // Mark as unlocked
84 mLocked = false;
85 mOwnerCore = 0xFFFFFFFF;
86
87 // Release the spinlock with interrupt state restoration (0 means enable interrupts)
88 spin_unlock(spinlock, 0);
89}
90
91bool MutexRP::try_lock() {
92 if (mSpinlock == nullptr) {

Callers 11

getOrCreateIdMethod · 0.45
getIdMethod · 0.45
removeIdMethod · 0.45
sizeMethod · 0.45
clearMethod · 0.45
remove_handlerMethod · 0.45
~lock_guardMethod · 0.45
unique_lockClass · 0.45
FL_TEST_FILEFunction · 0.45
FL_TEST_FILEFunction · 0.45
FL_TEST_FILEFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected