diff options
Diffstat (limited to 'libports/interrupted.c')
-rw-r--r-- | libports/interrupted.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libports/interrupted.c b/libports/interrupted.c index e4cb2fc2..88fb9ef0 100644 --- a/libports/interrupted.c +++ b/libports/interrupted.c @@ -20,7 +20,7 @@ #include "ports.h" -static spin_lock_t interrupted_lock = SPIN_LOCK_INITIALIZER; +static pthread_spinlock_t interrupted_lock = PTHREAD_SPINLOCK_INITIALIZER; /* True if some active rpc has been interrupted. */ static struct rpc_info *interrupted = 0; @@ -33,19 +33,19 @@ ports_self_interrupted () struct rpc_info **rpc_p, *rpc; thread_t self = hurd_thread_self (); - spin_lock (&interrupted_lock); + pthread_spin_lock (&interrupted_lock); for (rpc_p = &interrupted; *rpc_p; rpc_p = &rpc->interrupted_next) { rpc = *rpc_p; if (rpc->thread == self) { *rpc_p = rpc->interrupted_next; - spin_unlock (&interrupted_lock); + pthread_spin_unlock (&interrupted_lock); rpc->interrupted_next = 0; return 1; } } - spin_unlock (&interrupted_lock); + pthread_spin_unlock (&interrupted_lock); return 0; } @@ -56,14 +56,14 @@ _ports_record_interruption (struct rpc_info *rpc) { struct rpc_info *i; - spin_lock (&interrupted_lock); + pthread_spin_lock (&interrupted_lock); /* See if RPC is already in the interrupted list. */ for (i = interrupted; i; i = i->interrupted_next) if (i == rpc) /* Yup, it is, so just leave it there. */ { - spin_unlock (&interrupted_lock); + pthread_spin_unlock (&interrupted_lock); return; } @@ -71,5 +71,5 @@ _ports_record_interruption (struct rpc_info *rpc) rpc->interrupted_next = interrupted; interrupted = rpc; - spin_unlock (&interrupted_lock); + pthread_spin_unlock (&interrupted_lock); } |