Skip to content

Commit

Permalink
On Windows, OS2 and BEOS, the singluar lock mechanisms were already c…
Browse files Browse the repository at this point in the history
…ompatible

with timed locks, so there is no delta between DEFAULT and DEFAULT_TIMED.

Avoid gratuitous API changes to typical OS lock information.



git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1797415 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
wrowe committed Jun 2, 2017
1 parent 10e4e46 commit f3e077c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions locks/beos/proc_mutex.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ APR_DECLARE(const char *) apr_proc_mutex_lockfile(apr_proc_mutex_t *mutex)

APR_DECLARE(apr_lockmech_e) apr_proc_mutex_mech(apr_proc_mutex_t *mutex)
{
return APR_LOCK_DEFAULT_TIMED;
return APR_LOCK_DEFAULT;
}

APR_DECLARE(const char *) apr_proc_mutex_name(apr_proc_mutex_t *mutex)
Expand All @@ -194,7 +194,7 @@ APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex
ospmutex->sem = pmutex->Lock;
ospmutex->ben = pmutex->LockCount;
if (mech) {
*mech = APR_LOCK_DEFAULT_TIMED;
*mech = APR_LOCK_DEFAULT;
}
return APR_SUCCESS;
}
Expand Down Expand Up @@ -236,7 +236,7 @@ APR_DECLARE(apr_status_t) apr_os_proc_mutex_put(apr_proc_mutex_t **pmutex,
apr_os_proc_mutex_t *ospmutex,
apr_pool_t *pool)
{
return apr_os_proc_mutex_put_ex(pmutex, ospmutex, APR_LOCK_DEFAULT_TIMED,
return apr_os_proc_mutex_put_ex(pmutex, ospmutex, APR_LOCK_DEFAULT,
0, pool);
}

6 changes: 3 additions & 3 deletions locks/os2/proc_mutex.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ APR_DECLARE(const char *) apr_proc_mutex_lockfile(apr_proc_mutex_t *mutex)

APR_DECLARE(apr_lockmech_e) apr_proc_mutex_mech(apr_proc_mutex_t *mutex)
{
return APR_LOCK_DEFAULT_TIMED;
return APR_LOCK_DEFAULT;
}

APR_DECLARE(const char *) apr_proc_mutex_name(apr_proc_mutex_t *mutex)
Expand Down Expand Up @@ -240,7 +240,7 @@ APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex
{
*ospmutex = pmutex->hMutex;
if (mech) {
*mech = APR_LOCK_DEFAULT_TIMED;
*mech = APR_LOCK_DEFAULT;
}
return APR_SUCCESS;
}
Expand Down Expand Up @@ -283,7 +283,7 @@ APR_DECLARE(apr_status_t) apr_os_proc_mutex_put(apr_proc_mutex_t **pmutex,
apr_os_proc_mutex_t *ospmutex,
apr_pool_t *pool)
{
return apr_os_proc_mutex_put_ex(pmutex, ospmutex, APR_LOCK_DEFAULT_TIMED,
return apr_os_proc_mutex_put_ex(pmutex, ospmutex, APR_LOCK_DEFAULT,
0, pool);
}

6 changes: 3 additions & 3 deletions locks/win32/proc_mutex.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ APR_DECLARE(const char *) apr_proc_mutex_lockfile(apr_proc_mutex_t *mutex)

APR_DECLARE(apr_lockmech_e) apr_proc_mutex_mech(apr_proc_mutex_t *mutex)
{
return APR_LOCK_DEFAULT_TIMED;
return APR_LOCK_DEFAULT;
}

APR_DECLARE(const char *) apr_proc_mutex_name(apr_proc_mutex_t *mutex)
Expand All @@ -253,7 +253,7 @@ APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex
{
*ospmutex = pmutex->handle;
if (mech) {
*mech = APR_LOCK_DEFAULT_TIMED;
*mech = APR_LOCK_DEFAULT;
}
return APR_SUCCESS;
}
Expand Down Expand Up @@ -295,7 +295,7 @@ APR_DECLARE(apr_status_t) apr_os_proc_mutex_put(apr_proc_mutex_t **pmutex,
apr_os_proc_mutex_t *ospmutex,
apr_pool_t *pool)
{
return apr_os_proc_mutex_put_ex(pmutex, ospmutex, APR_LOCK_DEFAULT_TIMED,
return apr_os_proc_mutex_put_ex(pmutex, ospmutex, APR_LOCK_DEFAULT,
0, pool);
}

0 comments on commit f3e077c

Please sign in to comment.