summaryrefslogtreecommitdiff
path: root/libiohelp/get_conch.c
diff options
context:
space:
mode:
Diffstat (limited to 'libiohelp/get_conch.c')
-rw-r--r--libiohelp/get_conch.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libiohelp/get_conch.c b/libiohelp/get_conch.c
index 64d347ab..e3af6939 100644
--- a/libiohelp/get_conch.c
+++ b/libiohelp/get_conch.c
@@ -29,26 +29,26 @@ iohelp_get_conch (struct conch *c)
if (user_sh)
{
- spin_lock (&user_sh->lock);
+ pthread_spin_lock (&user_sh->lock);
switch (user_sh->conch_status)
{
case USER_HAS_CONCH:
user_sh->conch_status = USER_RELEASE_CONCH;
/* fall through ... */
case USER_RELEASE_CONCH:
- spin_unlock (&user_sh->lock);
- condition_wait (&c->wait, c->lock);
+ pthread_spin_unlock (&user_sh->lock);
+ pthread_cond_wait (&c->wait, c->lock);
/* Anything can have happened */
goto again;
case USER_COULD_HAVE_CONCH:
user_sh->conch_status = USER_HAS_NOT_CONCH;
- spin_unlock (&user_sh->lock);
+ pthread_spin_unlock (&user_sh->lock);
iohelp_fetch_shared_data (c->holder);
break;
case USER_HAS_NOT_CONCH:
- spin_unlock (&user_sh->lock);
+ pthread_spin_unlock (&user_sh->lock);
break;
}
}