You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by yl...@apache.org on 2016/03/06 01:26:20 UTC
svn commit: r1733776 - in /apr/apr/trunk: include/apr_portable.h
locks/netware/proc_mutex.c
Author: ylavic
Date: Sun Mar 6 00:26:20 2016
New Revision: 1733776
URL: http://svn.apache.org/viewvc?rev=1733776&view=rev
Log:
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.
Modified:
apr/apr/trunk/include/apr_portable.h
apr/apr/trunk/locks/netware/proc_mutex.c
Modified: apr/apr/trunk/include/apr_portable.h
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/apr_portable.h?rev=1733776&r1=1733775&r2=1733776&view=diff
==============================================================================
--- apr/apr/trunk/include/apr_portable.h (original)
+++ apr/apr/trunk/include/apr_portable.h Sun Mar 6 00:26:20 2016
@@ -112,7 +112,7 @@ typedef void* apr_os_shm
typedef int apr_os_file_t;
typedef DIR apr_os_dir_t;
typedef int apr_os_sock_t;
-typedef NXMutex_t apr_os_proc_mutex_t;
+typedef NXMutex_t * apr_os_proc_mutex_t;
typedef NXThreadId_t apr_os_thread_t;
typedef long apr_os_proc_t;
typedef NXKey_t apr_os_threadkey_t;
Modified: apr/apr/trunk/locks/netware/proc_mutex.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/locks/netware/proc_mutex.c?rev=1733776&r1=1733775&r2=1733776&view=diff
==============================================================================
--- apr/apr/trunk/locks/netware/proc_mutex.c (original)
+++ apr/apr/trunk/locks/netware/proc_mutex.c Sun Mar 6 00:26:20 2016
@@ -130,21 +130,15 @@ APR_DECLARE(apr_status_t) apr_os_proc_mu
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_mu
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_mu
(*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,