2022-11-04 17:25:57 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
|
|
|
|
#include "two_state_shared_lock.h"
|
|
|
|
|
2022-11-23 17:22:39 +00:00
|
|
|
void __bch2_two_state_lock(two_state_lock_t *lock, int s)
|
2022-11-04 17:25:57 +00:00
|
|
|
{
|
2022-11-23 17:22:39 +00:00
|
|
|
__wait_event(lock->wait, bch2_two_state_trylock(lock, s));
|
2022-11-04 17:25:57 +00:00
|
|
|
}
|