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 2023/03/20 16:27:15 UTC

svn commit: r1908579 - in /apr/apr/branches/1.8.x: ./ threadproc/beos/thread.c threadproc/netware/thread.c threadproc/os2/thread.c threadproc/unix/thread.c threadproc/win32/thread.c

Author: ylavic
Date: Mon Mar 20 16:27:15 2023
New Revision: 1908579

URL: http://svn.apache.org/viewvc?rev=1908579&view=rev
Log:
apr_thread: Follow up to r1897207: apr_thread_current_create() is ENOTIMPL w/o APR_HAS_THREAD_LOCAL.

It's useless when !APR_HAS_THREAD_LOCAL since apr_thread_current() can't work.


Merges r1908417 from trunk.
Submitted by: ylavic

Modified:
    apr/apr/branches/1.8.x/   (props changed)
    apr/apr/branches/1.8.x/threadproc/beos/thread.c
    apr/apr/branches/1.8.x/threadproc/netware/thread.c
    apr/apr/branches/1.8.x/threadproc/os2/thread.c
    apr/apr/branches/1.8.x/threadproc/unix/thread.c
    apr/apr/branches/1.8.x/threadproc/win32/thread.c

Propchange: apr/apr/branches/1.8.x/
------------------------------------------------------------------------------
  Merged /apr/apr/trunk:r1908417

Modified: apr/apr/branches/1.8.x/threadproc/beos/thread.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.8.x/threadproc/beos/thread.c?rev=1908579&r1=1908578&r2=1908579&view=diff
==============================================================================
--- apr/apr/branches/1.8.x/threadproc/beos/thread.c (original)
+++ apr/apr/branches/1.8.x/threadproc/beos/thread.c Mon Mar 20 16:27:15 2023
@@ -165,6 +165,7 @@ APR_DECLARE(apr_status_t) apr_thread_cur
                                                     apr_threadattr_t *attr,
                                                     apr_pool_t *pool)
 {
+#if APR_HAS_THREAD_LOCAL
     apr_status_t stat;
 
     *current = apr_thread_current();
@@ -180,10 +181,11 @@ APR_DECLARE(apr_status_t) apr_thread_cur
 
     (*current)->td = apr_os_thread_current();
 
-#if APR_HAS_THREAD_LOCAL
     current_thread = *current;
-#endif
     return APR_SUCCESS;
+#else
+    return APR_ENOTIMPL;
+#endif
 }
 
 APR_DECLARE(void) apr_thread_current_after_fork(void)

Modified: apr/apr/branches/1.8.x/threadproc/netware/thread.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.8.x/threadproc/netware/thread.c?rev=1908579&r1=1908578&r2=1908579&view=diff
==============================================================================
--- apr/apr/branches/1.8.x/threadproc/netware/thread.c (original)
+++ apr/apr/branches/1.8.x/threadproc/netware/thread.c Mon Mar 20 16:27:15 2023
@@ -200,6 +200,7 @@ APR_DECLARE(apr_status_t) apr_thread_cur
                                                     apr_threadattr_t *attr,
                                                     apr_pool_t *pool)
 {
+#if APR_HAS_THREAD_LOCAL
     apr_status_t stat;
 
     *current = apr_thread_current();
@@ -215,10 +216,11 @@ APR_DECLARE(apr_status_t) apr_thread_cur
 
     (*current)->td = apr_os_thread_current();
 
-#if APR_HAS_THREAD_LOCAL
     current_thread = *current;
-#endif
     return APR_SUCCESS;
+#else
+    return APR_ENOTIMPL;
+#endif
 }
 
 APR_DECLARE(void) apr_thread_current_after_fork(void)

Modified: apr/apr/branches/1.8.x/threadproc/os2/thread.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.8.x/threadproc/os2/thread.c?rev=1908579&r1=1908578&r2=1908579&view=diff
==============================================================================
--- apr/apr/branches/1.8.x/threadproc/os2/thread.c (original)
+++ apr/apr/branches/1.8.x/threadproc/os2/thread.c Mon Mar 20 16:27:15 2023
@@ -168,6 +168,7 @@ APR_DECLARE(apr_status_t) apr_thread_cur
                                                     apr_threadattr_t *attr,
                                                     apr_pool_t *pool)
 {
+#if APR_HAS_THREAD_LOCAL
     apr_status_t stat;
 
     *current = apr_thread_current();
@@ -183,10 +184,11 @@ APR_DECLARE(apr_status_t) apr_thread_cur
 
     (*current)->tid = apr_os_thread_current();
 
-#if APR_HAS_THREAD_LOCAL
     current_thread = *current;
-#endif
     return APR_SUCCESS;
+#else
+    return APR_ENOTIMPL;
+#endif
 }
 
 APR_DECLARE(void) apr_thread_current_after_fork(void)

Modified: apr/apr/branches/1.8.x/threadproc/unix/thread.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.8.x/threadproc/unix/thread.c?rev=1908579&r1=1908578&r2=1908579&view=diff
==============================================================================
--- apr/apr/branches/1.8.x/threadproc/unix/thread.c (original)
+++ apr/apr/branches/1.8.x/threadproc/unix/thread.c Mon Mar 20 16:27:15 2023
@@ -241,6 +241,7 @@ APR_DECLARE(apr_status_t) apr_thread_cur
                                                     apr_threadattr_t *attr,
                                                     apr_pool_t *pool)
 {
+#if APR_HAS_THREAD_LOCAL
     apr_status_t stat;
 
     *current = apr_thread_current();
@@ -256,10 +257,11 @@ APR_DECLARE(apr_status_t) apr_thread_cur
 
     *(*current)->td = apr_os_thread_current();
 
-#if APR_HAS_THREAD_LOCAL
     current_thread = *current;
-#endif
     return APR_SUCCESS;
+#else
+    return APR_ENOTIMPL;
+#endif
 }
 
 APR_DECLARE(void) apr_thread_current_after_fork(void)

Modified: apr/apr/branches/1.8.x/threadproc/win32/thread.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.8.x/threadproc/win32/thread.c?rev=1908579&r1=1908578&r2=1908579&view=diff
==============================================================================
--- apr/apr/branches/1.8.x/threadproc/win32/thread.c (original)
+++ apr/apr/branches/1.8.x/threadproc/win32/thread.c Mon Mar 20 16:27:15 2023
@@ -189,6 +189,7 @@ APR_DECLARE(apr_status_t) apr_thread_cur
                                                     apr_threadattr_t *attr,
                                                     apr_pool_t *pool)
 {
+#if APR_HAS_THREAD_LOCAL
     apr_status_t stat;
 
     *current = apr_thread_current();
@@ -206,10 +207,11 @@ APR_DECLARE(apr_status_t) apr_thread_cur
         (*current)->td = apr_os_thread_current();
     }
 
-#if APR_HAS_THREAD_LOCAL
     current_thread = *current;
-#endif
     return APR_SUCCESS;
+#else
+    return APR_ENOTIMPL;
+#endif
 }
 
 APR_DECLARE(void) apr_thread_current_after_fork(void)