Re: svn commit: r1906889 - in /apr/apr/trunk: ./ build/ include/ include/arch/win32/ test/ threadproc/beos/ threadproc/netware/ threadproc/os2/ threadproc/unix/ threadproc/win32/
Rainer Jung <[email protected]>
| Newsgroups | gmane.comp.apache.apr.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello Ivan, Am 21.01.23 um 17:13 schrieb [email protected]: > Author: ivan > Date: Sat Jan 21 16:13:27 2023 > New Revision: 1906889 > > URL: http://svn.apache.org/viewvc?rev=1906889&view=rev > Log: > Merge thread-name branch (PR 60587) [1]: > * Introduce apr_thread_name_set() and apr_thread_name_get(). > > [1] https://bz.apache.org/bugzilla/show_bug.cgi?id=60587 > [2] https://lists.apache.org/thread/z24logzc6v8tc0p2q3375cc10qo9y5yw > > Modified: > apr/apr/trunk/ (props changed) > apr/apr/trunk/build/apr_threads.m4 > apr/apr/trunk/configure.in > apr/apr/trunk/include/apr_thread_proc.h > apr/apr/trunk/include/arch/win32/apr_arch_misc.h > apr/apr/trunk/test/testthread.c > 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 > > Propchange: apr/apr/trunk/ > ------------------------------------------------------------------------------ > Merged /apr/apr/branches/thread-name:r1902296-1906888 > > Modified: apr/apr/trunk/build/apr_threads.m4 > URL: http://svn.apache.org/viewvc/apr/apr/trunk/build/apr_threads.m4?rev=1906889&r1=1906888&r2=1906889&view=diff > ============================================================================== > --- apr/apr/trunk/build/apr_threads.m4 (original) > +++ apr/apr/trunk/build/apr_threads.m4 Sat Jan 21 16:13:27 2023 > @@ -312,3 +312,27 @@ elif test "$apr_cv_mutex_robust_shared" > [Define if non-posix/portable cross-process robust mutexes are available]) > fi > ]) > + > + > +dnl Check for pthread_setname_np > +dnl Note: Only detects two-arg version > +AC_DEFUN([APR_CHECK_PTHREAD_SETNAME_NP], [ > +AC_CACHE_CHECK([for pthread_setname_np support], > +[apr_cv_pthread_setname_np], [ > +AC_TRY_COMPILE([ > +#include <pthread.h> > +],[ > +pthread_t td = pthread_self(); > +pthread_setname_np(td, "name"); > +],[ > + apr_cv_pthread_setname_np=yes > +],[ > + apr_cv_pthread_setname_np=no > +])]) > + > +if test "$apr_cv_pthread_setname_np" = "yes"; then > + AC_DEFINE([HAVE_PTHREAD_SETNAME_NP], 1, > + [Define if pthread_setname_np is available]) > +fi > +])dnl > + Thsi configure check does *not* fail for me on SLES 11 where pthread_[gs]ername_np is not available. In config.log I find warning: implicit declaration of function ‘pthread_setname_np’ but configure procees with a "yes". The buidl then succeeds, but the library is not usable due to the unresolvable symbol. Best regards, Rainer