summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-10-07 14:25:41 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-10-07 14:25:41 (EDT)
commit59533cfca64a8378a3bac2b649b0445f6cf9bebd (patch)
tree056592434ef46a8d2598210efdb10d6ebb31f9bb
parent316cb246f3998da0283cd6f55febada21086dc3a (diff)
mutex_lock_timeout(): Rename to mutex_timedlock()
-rw-r--r--lib/mutex.sh2
-rw-r--r--lib/session.sh4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/mutex.sh b/lib/mutex.sh
index 00333a2..fb96e66 100644
--- a/lib/mutex.sh
+++ b/lib/mutex.sh
@@ -28,7 +28,7 @@ mutex_trylock()
(set -C; printf '%d\n' "${$}" >"${mutex}") 2>/dev/null
}
-mutex_lock_timeout()
+mutex_timedlock()
{
local mutex="${1}"
local timeout="${2}"
diff --git a/lib/session.sh b/lib/session.sh
index fec6aec..0e29d4b 100644
--- a/lib/session.sh
+++ b/lib/session.sh
@@ -57,7 +57,7 @@ session_begin()
session_set_sigs
- if ! mutex_lock_timeout "${session_root}/prokit/sessions.lock" 5; then
+ if ! mutex_timedlock "${session_root}/prokit/sessions.lock" 5; then
error 2 "$(get_msg 'cant_lock_sessions')"
fi
@@ -100,7 +100,7 @@ session_end()
rmdir "${session_root}/prokit/sessions/${session_id}"
if ! mutex_is_unlockable "${session_root}/prokit/sessions.lock"; then
- if ! mutex_lock_timeout "${session_root}/prokit/sessions.lock" 5
+ if ! mutex_timedlock "${session_root}/prokit/sessions.lock" 5
then
error 2 "$(get_msg 'cant_lock_sessions')"
fi