mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-05-03 20:07:24 -04:00
dm vdo: fold thread-cond-var.c into thread-utils
Further cleanup is needed for thread-utils interfaces given many functions should return void or be removed entirely because they amount to obfuscation via wrappers. Signed-off-by: Mike Snitzer <snitzer@kernel.org> Signed-off-by: Matthew Sakai <msakai@redhat.com>
This commit is contained in:
@@ -135,3 +135,14 @@ int uds_join_threads(struct thread *thread)
|
||||
uds_free(thread);
|
||||
return UDS_SUCCESS;
|
||||
}
|
||||
|
||||
void uds_wait_cond(struct cond_var *cv, struct mutex *mutex)
|
||||
{
|
||||
DEFINE_WAIT(__wait);
|
||||
|
||||
prepare_to_wait(&cv->wait_queue, &__wait, TASK_IDLE);
|
||||
uds_unlock_mutex(mutex);
|
||||
schedule();
|
||||
finish_wait(&cv->wait_queue, &__wait);
|
||||
uds_lock_mutex(mutex);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user