Lines Matching refs:SpinLock
56 This function initializes the spin lock specified by SpinLock to the released
57 state, and returns SpinLock. Optimal performance can be achieved by calling
59 SpinLock.
61 If SpinLock is NULL, then ASSERT().
63 @param SpinLock A pointer to the spin lock to initialize to the released
66 @return SpinLock is in release state.
72 OUT SPIN_LOCK *SpinLock
75 ASSERT (SpinLock != NULL);
78 *SpinLock = SPIN_LOCK_RELEASED;
81 return SpinLock;
87 This function checks the state of the spin lock specified by SpinLock. If
88 SpinLock is in the released state, then this function places SpinLock in the
89 acquired state and returns SpinLock. Otherwise, this function waits
91 acquired state and returns SpinLock. All state transitions of SpinLock must
94 If SpinLock is NULL, then ASSERT().
95 If SpinLock was not initialized with InitializeSpinLock(), then ASSERT().
96 If PcdSpinLockTimeout is not zero, and SpinLock is can not be acquired in
99 @param SpinLock A pointer to the spin lock to place in the acquired state.
101 @return SpinLock acquired the lock.
107 IN OUT SPIN_LOCK *SpinLock
120 while (!AcquireSpinLockOrFail (SpinLock)) {
123 } else if (!AcquireSpinLockOrFail (SpinLock)) {
153 while (!AcquireSpinLockOrFail (SpinLock)) {
168 return SpinLock;
174 This function checks the state of the spin lock specified by SpinLock. If
175 SpinLock is in the released state, then this function places SpinLock in the
177 transitions of SpinLock must be performed using MP safe mechanisms.
179 If SpinLock is NULL, then ASSERT().
180 If SpinLock was not initialized with InitializeSpinLock(), then ASSERT().
182 @param SpinLock A pointer to the spin lock to place in the acquired state.
184 @retval TRUE SpinLock was placed in the acquired state.
185 @retval FALSE SpinLock could not be acquired.
191 IN OUT SPIN_LOCK *SpinLock
197 ASSERT (SpinLock != NULL);
199 LockValue = *SpinLock;
204 (VOID**)SpinLock,
216 This function places the spin lock specified by SpinLock in the release state
217 and returns SpinLock.
219 If SpinLock is NULL, then ASSERT().
220 If SpinLock was not initialized with InitializeSpinLock(), then ASSERT().
222 @param SpinLock A pointer to the spin lock to release.
224 @return SpinLock released the lock.
230 IN OUT SPIN_LOCK *SpinLock
235 ASSERT (SpinLock != NULL);
237 LockValue = *SpinLock;
241 *SpinLock = SPIN_LOCK_RELEASED;
244 return SpinLock;