diff options
author | Yann Ylavic <ylavic@apache.org> | 2016-03-06 00:26:20 +0000 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2016-03-06 00:26:20 +0000 |
commit | 9780427eb07994732d66e5d064552c3d47b1d9a3 (patch) | |
tree | fe5b1e17eab9a1215709353cafa4d3ca56e30bcd /locks/netware | |
parent | 4374120da1da5fefd2a1865868a698cc416f83c3 (diff) | |
download | apr-9780427eb07994732d66e5d064552c3d47b1d9a3.tar.gz |
proc_mutex-netware: follow up to r1733775.
Make apr_os_proc_mutex_{get,set}[_ex]() available by changing the
native apr_os_proc_mutex_t accessor type to a pointer.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1733776 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'locks/netware')
-rw-r--r-- | locks/netware/proc_mutex.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/locks/netware/proc_mutex.c b/locks/netware/proc_mutex.c index 04b7672f9..95dc8f8f4 100644 --- a/locks/netware/proc_mutex.c +++ b/locks/netware/proc_mutex.c @@ -130,21 +130,15 @@ APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex apr_proc_mutex_t *pmutex, apr_lockmech_e *mech) { -#if 1 - /* We need to change apr_os_proc_mutex_t to a pointer type - * to be able to implement this function. - */ - return APR_ENOTIMPL; -#else if (!pmutex->mutex) { return APR_ENOLOCK; } + *ospmutex = pmutex->mutex->mutex; if (mech) { *mech = APR_LOCK_DEFAULT; } return APR_SUCCESS; -#endif } APR_DECLARE(apr_status_t) apr_os_proc_mutex_get(apr_os_proc_mutex_t *ospmutex, @@ -164,12 +158,7 @@ APR_DECLARE(apr_status_t) apr_os_proc_mutex_put_ex(apr_proc_mutex_t **pmutex, if (mech != APR_LOCK_DEFAULT) { return APR_ENOTIMPL; } -#if 1 - /* We need to change apr_os_proc_mutex_t to a pointer type - * to be able to implement this function. - */ - return APR_ENOTIMPL; -#else + if ((*pmutex) == NULL) { (*pmutex) = apr_pcalloc(pool, sizeof(apr_proc_mutex_t)); (*pmutex)->pool = pool; @@ -178,7 +167,6 @@ APR_DECLARE(apr_status_t) apr_os_proc_mutex_put_ex(apr_proc_mutex_t **pmutex, (*pmutex)->mutex->mutex = *ospmutex; (*pmutex)->mutex->pool = pool; return APR_SUCCESS; -#endif } APR_DECLARE(apr_status_t) apr_os_proc_mutex_put(apr_proc_mutex_t **pmutex, |