summaryrefslogtreecommitdiff
path: root/threadproc/beos
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2023-03-15 16:29:41 +0000
committerYann Ylavic <ylavic@apache.org>2023-03-15 16:29:41 +0000
commite33e9a295910798e98fe787a6e32e9eb2da50679 (patch)
treedbd3dd3416c70aed67aae9792b98d19d1914855b /threadproc/beos
parentaf9307772b592ee351034dff5eca107e10f2397f (diff)
downloadapr-e33e9a295910798e98fe787a6e32e9eb2da50679.tar.gz
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. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908417 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc/beos')
-rw-r--r--threadproc/beos/thread.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/threadproc/beos/thread.c b/threadproc/beos/thread.c
index bf297330f..10fe03a97 100644
--- a/threadproc/beos/thread.c
+++ b/threadproc/beos/thread.c
@@ -166,6 +166,7 @@ APR_DECLARE(apr_status_t) apr_thread_current_create(apr_thread_t **current,
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_current_create(apr_thread_t **current,
(*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)