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/15 16:29:41 UTC
svn commit: r1908417 - in /apr/apr/trunk/threadproc: beos/thread.c netware/thread.c os2/thread.c unix/thread.c win32/thread.c
Author: ylavic
Date: Wed Mar 15 16:29:41 2023
New Revision: 1908417
URL: http://svn.apache.org/viewvc?rev=1908417&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.
Modified:
apr/apr/trunk/threadproc/beos/thread.c
apr/apr/trunk/threadproc/netware/thread.c
apr/apr/trunk/threadproc/os2/thread.c
apr/apr/trunk/threadproc/unix/thread.c
apr/apr/trunk/threadproc/win32/thread.c
Modified: apr/apr/trunk/threadproc/beos/thread.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/threadproc/beos/thread.c?rev=1908417&r1=1908416&r2=1908417&view=diff
==============================================================================
--- apr/apr/trunk/threadproc/beos/thread.c (original)
+++ apr/apr/trunk/threadproc/beos/thread.c Wed Mar 15 16:29:41 2023
@@ -166,6 +166,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();
@@ -181,10 +182,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/trunk/threadproc/netware/thread.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/threadproc/netware/thread.c?rev=1908417&r1=1908416&r2=1908417&view=diff
==============================================================================
--- apr/apr/trunk/threadproc/netware/thread.c (original)
+++ apr/apr/trunk/threadproc/netware/thread.c Wed Mar 15 16:29:41 2023
@@ -201,6 +201,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();
@@ -216,10 +217,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/trunk/threadproc/os2/thread.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/threadproc/os2/thread.c?rev=1908417&r1=1908416&r2=1908417&view=diff
==============================================================================
--- apr/apr/trunk/threadproc/os2/thread.c (original)
+++ apr/apr/trunk/threadproc/os2/thread.c Wed Mar 15 16:29:41 2023
@@ -169,6 +169,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();
@@ -184,10 +185,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/trunk/threadproc/unix/thread.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/threadproc/unix/thread.c?rev=1908417&r1=1908416&r2=1908417&view=diff
==============================================================================
--- apr/apr/trunk/threadproc/unix/thread.c (original)
+++ apr/apr/trunk/threadproc/unix/thread.c Wed Mar 15 16:29:41 2023
@@ -247,6 +247,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();
@@ -262,10 +263,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/trunk/threadproc/win32/thread.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/threadproc/win32/thread.c?rev=1908417&r1=1908416&r2=1908417&view=diff
==============================================================================
--- apr/apr/trunk/threadproc/win32/thread.c (original)
+++ apr/apr/trunk/threadproc/win32/thread.c Wed Mar 15 16:29:41 2023
@@ -182,6 +182,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();
@@ -199,10 +200,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)