[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apr-dev
Subject:    Re: [VOTE] Release APR-1.6.1 and APR-UTIL 1.6.0
From:       William A Rowe Jr <wrowe () rowe-clan ! net>
Date:       2017-05-31 22:24:51
Message-ID: CACsi252uK8q8uPO_f9XfDz9-_8pTmHr3iSd+pZxphLVMiFHQ0Q () mail ! gmail ! com
[Download RAW message or body]

Greg and others... (Netware, Win32, OS2, BEOS), please have a look
at the attached patch, which should apply to the 1.6.1 candidate.

It suggests several fixes are needed on 1.7.x branch as well, because
retrieving the lockmeth should succeed on Netware (and the answer
is always APR_LOCK_DEFAULT, on all these architectures.) Other
values on the create or put call must return failure.

Please let us know your results so that I can commit.



> On Wed, May 31, 2017 at 2:15 PM, William A Rowe Jr <wrowe@rowe-clan.net> wrote:
>> Investigating which commit may have been missed... Update within the hour.
>>
>> On May 31, 2017 1:44 PM, "Gregg Smith" <gls@gknw.net> wrote:
>>>
>>> Something tells me not everything of timelock got ripped out.
>>>
>>>         cl.exe /nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I
>>> "./include/arch" /I "./include/arch/wi
>>> n32" /I "./include/arch/unix" /D "NDEBUG" /D "APR_DECLARE_STATIC" /D
>>> "WIN32" /D "WINNT" /D "_WINDOWS
>>> " /Fo".\LibR\\" /Fd".\LibR\apr-1" /FD /c .\locks\win32\proc_mutex.c
>>> proc_mutex.c
>>> .\locks\win32\proc_mutex.c(46): error C2065: 'APR_LOCK_DEFAULT_TIMED':
>>> undeclared identifier
>
> As often happens in mixed-purpose overloaded commits, this one needs to be
> backed out in pieces with a number of them retained;
>
> ------------------------------------------------------------------------
> r1738806 | ylavic | 2016-04-12 09:16:40 -0500 (Tue, 12 Apr 2016) | 26 lines
>
> Merge r1733775, r1738791 from trunk:
>
>
> apr_proc/global_mutex: Fix API regarding the native OS mutexes
> accessors from/to available APR mechanisms, adding the new functions
> apr_os_proc_mutex_get_ex() and apr_os_proc_mutex_set_ex() which give
> control to the user over the selected mechanisms, including the missing
> POSIX semaphores (sem_t) on platforms supporting them.
>
> For POSIX sems, this moves the "sem_t *psem_interproc;" member from struct
> apr_proc_mutex_t to apr_os_proc_mutex_t (now complete) so that we can avoid
> members duplication between the two structs, and hence replace all the doublons
> in apr_os_proc_mutex_t with an apr_os_proc_mutex_t member, called "os", to be
> used for runtime.
>
> This first commit aims to be backportable to 1.6.x, thus does not address the
> Netware case which requires an incompatible change of the apr_proc_mutex_t to
> a pointer type (the implementation is here since very similar to other changes
> is this commit, but it is commented out for now, a simple follow up is coming
> with the type change for trunk only...).
>
>
> proc_mutex-unix: follow up to r1733775.
> Restore mmap-ed fd close stripped by above commit.

["apr-1.6.1-drop-timed.patch" (text/x-patch)]

Index: locks/beos/proc_mutex.c
===================================================================
--- locks/beos/proc_mutex.c	(revision 1797100)
+++ locks/beos/proc_mutex.c	(working copy)
@@ -132,7 +132,7 @@
 
 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)
@@ -158,7 +158,7 @@
     ospmutex->sem = pmutex->Lock;
     ospmutex->ben = pmutex->LockCount;
     if (mech) {
-        *mech = APR_LOCK_DEFAULT_TIMED;
+        *mech = APR_LOCK_DEFAULT;
     }
     return APR_SUCCESS;
 }
@@ -178,7 +178,7 @@
     if (pool == NULL) {
         return APR_ENOPOOL;
     }
-    if (mech != APR_LOCK_DEFAULT && mech != APR_LOCK_DEFAULT_TIMED) {
+    if (mech != APR_LOCK_DEFAULT) {
         return APR_ENOTIMPL;
     }
 
@@ -200,7 +200,7 @@
                                                 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);
 }
 
Index: locks/netware/proc_mutex.c
===================================================================
--- locks/netware/proc_mutex.c	(revision 1797100)
+++ locks/netware/proc_mutex.c	(working copy)
@@ -27,9 +27,13 @@
 {
     apr_status_t ret;
     apr_proc_mutex_t *new_mutex = NULL;
+
+    if (mech != APR_LOCK_DEFAULT) {
+        return APR_ENOTIMPL;
+    }
+
     new_mutex = (apr_proc_mutex_t *)apr_pcalloc(pool, sizeof(apr_proc_mutex_t));
-	
-	if(new_mutex ==NULL) {
+    if (new_mutex == NULL) {
         return APR_ENOMEM;
     }     
     
@@ -123,10 +127,12 @@
     if (mech) {
         *mech = APR_LOCK_DEFAULT;
     }
-    return APR_SUCCESS;
 #else
-    return APR_ENOTIMPL;
+    if (mech) {
+        *mech = APR_LOCK_DEFAULT;
+    }
 #endif
+    return APR_SUCCESS;
 }
 
 APR_DECLARE(apr_status_t) apr_os_proc_mutex_get(apr_os_proc_mutex_t *ospmutex,
Index: locks/os2/proc_mutex.c
===================================================================
--- locks/os2/proc_mutex.c	(revision 1797100)
+++ locks/os2/proc_mutex.c	(working copy)
@@ -62,7 +62,7 @@
 
 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)
@@ -218,7 +218,7 @@
 {
     *ospmutex = pmutex->hMutex;
     if (mech) {
-        *mech = APR_LOCK_DEFAULT_TIMED;
+        return *mech = APR_LOCK_DEFAULT;
     }
     return APR_SUCCESS;
 }
@@ -239,7 +239,7 @@
     if (pool == NULL) {
         return APR_ENOPOOL;
     }
-    if (mech != APR_LOCK_DEFAULT && mech != APR_LOCK_DEFAULT_TIMED) {
+    if (mech != APR_LOCK_DEFAULT) {
         return APR_ENOTIMPL;
     }
 
@@ -261,7 +261,7 @@
                                                 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);
 }
 
Index: locks/win32/proc_mutex.c
===================================================================
--- locks/win32/proc_mutex.c	(revision 1797100)
+++ locks/win32/proc_mutex.c	(working copy)
@@ -43,7 +43,7 @@
     HANDLE hMutex;
     void *mutexkey;
 
-    if (mech != APR_LOCK_DEFAULT && mech != APR_LOCK_DEFAULT_TIMED) {
+    if (mech != APR_LOCK_DEFAULT) {
         return APR_ENOTIMPL;
     }
 
@@ -195,7 +195,7 @@
 
 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)
@@ -220,7 +220,7 @@
 {
     *ospmutex = pmutex->handle;
     if (mech) {
-        *mech = APR_LOCK_DEFAULT_TIMED;
+        *mech = APR_LOCK_DEFAULT;
     }
     return APR_SUCCESS;
 }
@@ -240,7 +240,7 @@
     if (pool == NULL) {
         return APR_ENOPOOL;
     }
-    if (mech != APR_LOCK_DEFAULT && mech != APR_LOCK_DEFAULT_TIMED) {
+    if (mech != APR_LOCK_DEFAULT) {
         return APR_ENOTIMPL;
     }
 
@@ -262,7 +262,7 @@
                                                 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);
 }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic