diff options
author | Yann Ylavic <ylavic@apache.org> | 2022-01-25 10:41:15 +0000 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2022-01-25 10:41:15 +0000 |
commit | 367a9c3c50b18fccf2ca899fc1ea01a221928673 (patch) | |
tree | 6921a3df72d4aa456c518f84ba06ca17e8e4b7ae /threadproc | |
parent | 3c0a292ceeabd8a58a984b3279097f033b44659c (diff) | |
download | apr-367a9c3c50b18fccf2ca899fc1ea01a221928673.tar.gz |
apr_thread: Follow up to r1897207: Don't NULLify current_thread on exit.
It's not needed, when the thread exits it's not accessible anyway.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1897445 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc')
-rw-r--r-- | threadproc/beos/thread.c | 8 | ||||
-rw-r--r-- | threadproc/netware/thread.c | 8 | ||||
-rw-r--r-- | threadproc/os2/thread.c | 9 | ||||
-rw-r--r-- | threadproc/unix/thread.c | 8 | ||||
-rw-r--r-- | threadproc/win32/thread.c | 5 |
5 files changed, 5 insertions, 33 deletions
diff --git a/threadproc/beos/thread.c b/threadproc/beos/thread.c index 501678373..faa255b63 100644 --- a/threadproc/beos/thread.c +++ b/threadproc/beos/thread.c @@ -63,7 +63,7 @@ APR_DECLARE(apr_status_t) apr_threadattr_guardsize_set(apr_threadattr_t *attr, } #ifdef APR_HAS_THREAD_LOCAL -static APR_THREAD_LOCAL apr_thread_t *current_thread; +static APR_THREAD_LOCAL apr_thread_t *current_thread = NULL; #endif static void *dummy_worker(void *opaque) @@ -81,9 +81,6 @@ static void *dummy_worker(void *opaque) apr_pool_destroy(thd->pool); } -#ifdef APR_HAS_THREAD_LOCAL - current_thread = NULL; -#endif return ret; } @@ -212,9 +209,6 @@ APR_DECLARE(void) apr_thread_exit(apr_thread_t *thd, apr_status_t retval) if (thd->detached) { apr_pool_destroy(thd->pool); } -#ifdef APR_HAS_THREAD_LOCAL - current_thread = NULL; -#endif exit_thread ((status_t)(retval)); } diff --git a/threadproc/netware/thread.c b/threadproc/netware/thread.c index 86213a01f..a160cb71d 100644 --- a/threadproc/netware/thread.c +++ b/threadproc/netware/thread.c @@ -65,7 +65,7 @@ APR_DECLARE(apr_status_t) apr_threadattr_guardsize_set(apr_threadattr_t *attr, } #ifdef APR_HAS_THREAD_LOCAL -static APR_THREAD_LOCAL apr_thread_t *current_thread; +static APR_THREAD_LOCAL apr_thread_t *current_thread = NULL; #endif static void *dummy_worker(void *opaque) @@ -83,9 +83,6 @@ static void *dummy_worker(void *opaque) apr_pool_destroy(thd->pool); } -#ifdef APR_HAS_THREAD_LOCAL - current_thread = NULL; -#endif return ret; } @@ -252,9 +249,6 @@ void apr_thread_exit(apr_thread_t *thd, apr_status_t retval) if (thd->detached) { apr_pool_destroy(thd->pool); } -#ifdef APR_HAS_THREAD_LOCAL - current_thread = NULL; -#endif NXThreadExit(NULL); } diff --git a/threadproc/os2/thread.c b/threadproc/os2/thread.c index bcb3d7b20..3c590a6dc 100644 --- a/threadproc/os2/thread.c +++ b/threadproc/os2/thread.c @@ -69,7 +69,7 @@ APR_DECLARE(apr_status_t) apr_threadattr_guardsize_set(apr_threadattr_t *attr, } #ifdef APR_HAS_THREAD_LOCAL -static APR_THREAD_LOCAL apr_thread_t *current_thread; +static APR_THREAD_LOCAL apr_thread_t *current_thread = NULL; #endif static void dummy_worker(void *opaque) @@ -84,10 +84,6 @@ static void dummy_worker(void *opaque) if (thd->attr->attr & APR_THREADATTR_DETACHED) { apr_pool_destroy(thread->pool); } - -#ifdef APR_HAS_THREAD_LOCAL - current_thread = NULL; -#endif } @@ -217,9 +213,6 @@ APR_DECLARE(void) apr_thread_exit(apr_thread_t *thd, apr_status_t retval) if (thd->attr->attr & APR_THREADATTR_DETACHED) { apr_pool_destroy(thd->pool); } -#ifdef APR_HAS_THREAD_LOCAL - current_thread = NULL; -#endif _endthread(); } diff --git a/threadproc/unix/thread.c b/threadproc/unix/thread.c index 2b255252c..6d1874ac8 100644 --- a/threadproc/unix/thread.c +++ b/threadproc/unix/thread.c @@ -137,7 +137,7 @@ APR_DECLARE(apr_status_t) apr_threadattr_guardsize_set(apr_threadattr_t *attr, } #ifdef APR_HAS_THREAD_LOCAL -static APR_THREAD_LOCAL apr_thread_t *current_thread; +static APR_THREAD_LOCAL apr_thread_t *current_thread = NULL; #endif static void *dummy_worker(void *opaque) @@ -155,9 +155,6 @@ static void *dummy_worker(void *opaque) apr_pool_destroy(thread->pool); } -#ifdef APR_HAS_THREAD_LOCAL - current_thread = NULL; -#endif return ret; } @@ -290,9 +287,6 @@ APR_DECLARE(void) apr_thread_exit(apr_thread_t *thd, if (thd->detached) { apr_pool_destroy(thd->pool); } -#ifdef APR_HAS_THREAD_LOCAL - current_thread = NULL; -#endif pthread_exit(NULL); } diff --git a/threadproc/win32/thread.c b/threadproc/win32/thread.c index 281a44ac6..ee2070bc8 100644 --- a/threadproc/win32/thread.c +++ b/threadproc/win32/thread.c @@ -73,7 +73,7 @@ APR_DECLARE(apr_status_t) apr_threadattr_guardsize_set(apr_threadattr_t *attr, } #ifdef APR_HAS_THREAD_LOCAL -static APR_THREAD_LOCAL apr_thread_t *current_thread; +static APR_THREAD_LOCAL apr_thread_t *current_thread = NULL; #endif static void *dummy_worker(void *opaque) @@ -92,9 +92,6 @@ static void *dummy_worker(void *opaque) apr_pool_destroy(thd->pool); } -#ifdef APR_HAS_THREAD_LOCAL - current_thread = NULL; -#endif return ret; } |