You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by jo...@apache.org on 2019/07/03 06:55:52 UTC
svn commit: r1862446 - in /apr/apr/trunk: CHANGES include/apr_thread_proc.h
threadproc/beos/thread.c threadproc/netware/thread.c
threadproc/os2/thread.c threadproc/unix/thread.c threadproc/win32/thread.c
Author: jorton
Date: Wed Jul 3 06:55:51 2019
New Revision: 1862446
URL: http://svn.apache.org/viewvc?rev=1862446&view=rev
Log:
API/ABI change, drop return value of apr_thread_exit() which has
no useful (nor documented) semantic:
* include/apr_thread_proc.h (apr_thread_exit): Make void function;
mark with gcc noreturn attribute.
* threadproc/*/thread.c (apr_thread_exit): Update accordingly.
Modified:
apr/apr/trunk/CHANGES
apr/apr/trunk/include/apr_thread_proc.h
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/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr/trunk/CHANGES?rev=1862446&r1=1862445&r2=1862446&view=diff
==============================================================================
--- apr/apr/trunk/CHANGES [utf-8] (original)
+++ apr/apr/trunk/CHANGES [utf-8] Wed Jul 3 06:55:51 2019
@@ -1,6 +1,8 @@
-*- coding: utf-8 -*-
Changes for APR 2.0.0
+ *) apr_thread_exit() is now a void function. [Joe Orton]
+
*) apr_dir_read(): The returned finfo->name field is now duplicated
into the pool for all implementations. [Joe Orton]
Modified: apr/apr/trunk/include/apr_thread_proc.h
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/apr_thread_proc.h?rev=1862446&r1=1862445&r2=1862446&view=diff
==============================================================================
--- apr/apr/trunk/include/apr_thread_proc.h (original)
+++ apr/apr/trunk/include/apr_thread_proc.h Wed Jul 3 06:55:51 2019
@@ -270,12 +270,12 @@ APR_DECLARE(apr_status_t) apr_thread_cre
void *data, apr_pool_t *cont);
/**
- * stop the current thread
+ * Stop the current thread
* @param thd The thread to stop
* @param retval The return value to pass back to any thread that cares
*/
-APR_DECLARE(apr_status_t) apr_thread_exit(apr_thread_t *thd,
- apr_status_t retval);
+APR_DECLARE(void) apr_thread_exit(apr_thread_t *thd, apr_status_t retval)
+ __attribute__((noreturn));
/**
* block until the desired thread stops executing.
Modified: apr/apr/trunk/threadproc/beos/thread.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/threadproc/beos/thread.c?rev=1862446&r1=1862445&r2=1862446&view=diff
==============================================================================
--- apr/apr/trunk/threadproc/beos/thread.c (original)
+++ apr/apr/trunk/threadproc/beos/thread.c Wed Jul 3 06:55:51 2019
@@ -124,13 +124,11 @@ int apr_os_thread_equal(apr_os_thread_t
return tid1 == tid2;
}
-APR_DECLARE(apr_status_t) apr_thread_exit(apr_thread_t *thd, apr_status_t retval)
+APR_DECLARE(void) apr_thread_exit(apr_thread_t *thd, apr_status_t retval)
{
apr_pool_destroy(thd->pool);
thd->exitval = retval;
exit_thread ((status_t)(retval));
- /* This will never be reached... */
- return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_thread_join(apr_status_t *retval, apr_thread_t *thd)
Modified: apr/apr/trunk/threadproc/netware/thread.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/threadproc/netware/thread.c?rev=1862446&r1=1862445&r2=1862446&view=diff
==============================================================================
--- apr/apr/trunk/threadproc/netware/thread.c (original)
+++ apr/apr/trunk/threadproc/netware/thread.c Wed Jul 3 06:55:51 2019
@@ -159,13 +159,11 @@ void apr_thread_yield()
NXThreadYield();
}
-apr_status_t apr_thread_exit(apr_thread_t *thd,
- apr_status_t retval)
+void apr_thread_exit(apr_thread_t *thd, apr_status_t retval)
{
thd->exitval = retval;
apr_pool_destroy(thd->pool);
NXThreadExit(NULL);
- return APR_SUCCESS;
}
apr_status_t apr_thread_join(apr_status_t *retval,
Modified: apr/apr/trunk/threadproc/os2/thread.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/threadproc/os2/thread.c?rev=1862446&r1=1862445&r2=1862446&view=diff
==============================================================================
--- apr/apr/trunk/threadproc/os2/thread.c (original)
+++ apr/apr/trunk/threadproc/os2/thread.c Wed Jul 3 06:55:51 2019
@@ -131,12 +131,11 @@ APR_DECLARE(apr_os_thread_t) apr_os_thre
-APR_DECLARE(apr_status_t) apr_thread_exit(apr_thread_t *thd, apr_status_t retval)
+APR_DECLARE(void) apr_thread_exit(apr_thread_t *thd, apr_status_t retval)
{
thd->exitval = retval;
apr_pool_destroy(thd->pool);
_endthread();
- return -1; /* If we get here something's wrong */
}
Modified: apr/apr/trunk/threadproc/unix/thread.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/threadproc/unix/thread.c?rev=1862446&r1=1862445&r2=1862446&view=diff
==============================================================================
--- apr/apr/trunk/threadproc/unix/thread.c (original)
+++ apr/apr/trunk/threadproc/unix/thread.c Wed Jul 3 06:55:51 2019
@@ -204,13 +204,12 @@ APR_DECLARE(int) apr_os_thread_equal(apr
return pthread_equal(tid1, tid2);
}
-APR_DECLARE(apr_status_t) apr_thread_exit(apr_thread_t *thd,
- apr_status_t retval)
+APR_DECLARE(void) apr_thread_exit(apr_thread_t *thd,
+ apr_status_t retval)
{
thd->exitval = retval;
apr_pool_destroy(thd->pool);
pthread_exit(NULL);
- return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_thread_join(apr_status_t *retval,
Modified: apr/apr/trunk/threadproc/win32/thread.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/threadproc/win32/thread.c?rev=1862446&r1=1862445&r2=1862446&view=diff
==============================================================================
--- apr/apr/trunk/threadproc/win32/thread.c (original)
+++ apr/apr/trunk/threadproc/win32/thread.c Wed Jul 3 06:55:51 2019
@@ -134,8 +134,7 @@ APR_DECLARE(apr_status_t) apr_thread_cre
return APR_SUCCESS;
}
-APR_DECLARE(apr_status_t) apr_thread_exit(apr_thread_t *thd,
- apr_status_t retval)
+APR_DECLARE(void) apr_thread_exit(apr_thread_t *thd, apr_status_t retval)
{
thd->exitval = retval;
apr_pool_destroy(thd->pool);
@@ -145,7 +144,6 @@ APR_DECLARE(apr_status_t) apr_thread_exi
#else
ExitThread(0);
#endif
- return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_thread_join(apr_status_t *retval,