summaryrefslogtreecommitdiff
path: root/test/testprocmutex.c
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2017-04-07 00:01:16 +0000
committerYann Ylavic <ylavic@apache.org>2017-04-07 00:01:16 +0000
commitf7b5a5f20e3edfb8ef2f4077147acb0bf17b3fab (patch)
tree5c5c8a818d677acc7cf00a9b3cd5bfbf9a669977 /test/testprocmutex.c
parent0ea4c151aa5f650867a0afa3e92f90fc1bdbf114 (diff)
downloadapr-f7b5a5f20e3edfb8ef2f4077147acb0bf17b3fab.tar.gz
locks: follow up to r1667900.
Axe the 'absolute' argument of apr_{thread,proc,global}_mutex_timedlock() which was confusing, hence 'timeout' is always relative now. It still makes sense (to me) to handle a negative timeout as INFINITE, a nul one as IMMEDIATE, and a positive one as an upper bound timeout (like most if not all of the underlying system calls...). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1790488 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/testprocmutex.c')
-rw-r--r--test/testprocmutex.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/testprocmutex.c b/test/testprocmutex.c
index 3aff25b88..983aa953a 100644
--- a/test/testprocmutex.c
+++ b/test/testprocmutex.c
@@ -88,7 +88,7 @@ static void make_child(abts_case *tc, int trylock, apr_proc_t **proc, apr_pool_t
else if (trylock < 0) {
int wait_usec = 0;
- while ((rv = apr_proc_mutex_timedlock(proc_lock, 1, 0))) {
+ while ((rv = apr_proc_mutex_timedlock(proc_lock, 1))) {
if (!APR_STATUS_IS_TIMEUP(rv))
exit(1);
if (++wait_usec >= MAX_WAIT_USEC)
@@ -184,7 +184,7 @@ static void test_exclusive(abts_case *tc, const char *lockname,
*x == MAX_COUNTER);
}
- rv = apr_proc_mutex_timedlock(proc_lock, 1, 0);
+ rv = apr_proc_mutex_timedlock(proc_lock, 1);
if (rv == APR_ENOTIMPL) {
fprintf(stderr, "%s_timedlock() not implemented, ", mech->name);
ABTS_ASSERT(tc, "Default timed timedlock not implemented",
@@ -194,7 +194,7 @@ static void test_exclusive(abts_case *tc, const char *lockname,
APR_ASSERT_SUCCESS(tc, "check for timedlock", rv);
for (n = 0; n < 2; n++) {
- rv = apr_proc_mutex_timedlock(proc_lock, 1, 0);
+ rv = apr_proc_mutex_timedlock(proc_lock, 1);
/* Some mech (eg. flock or fcntl) may succeed when the
* lock is re-acquired in the same process.
*/