[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: python3.8 ftbfs on the Hurd and KFreeBSD



Svante Signell, le ven. 02 août 2019 11:50:18 +0200, a ecrit:
> On Fri, 2019-08-02 at 02:33 +0200, Samuel Thibault wrote:
> > Matthias Klose, le lun. 08 juil. 2019 13:37:00 +0200, a ecrit:
> > > The hurd-i386 and kfreebsd-* builds had some missing symbols, seen
> > > in ...
> 
> > Here is a mach implementation for the native thread ids, and the
> > patch to enable the symbol on hurd-any too.
> 
> I had prepared the following patch:
> 
> Index: python3.8-3.8.0~b2/Python/thread_pthread.h
> ===================================================================
> --- python3.8-3.8.0~b2.orig/Python/thread_pthread.h
> +++ python3.8-3.8.0~b2/Python/thread_pthread.h
> @@ -22,6 +22,8 @@
>  #   include <sys/thread.h>      /* thread_self() */
>  #elif defined(__NetBSD__)
>  #   include <lwp.h>             /* _lwp_self() */
> +#elif defined(__GNU__) || defined(__FreeBSD_kernel__)
> +#   include <pthread.h>         /* pthread_self() */
>  #endif
>  
>  /* The POSIX spec requires that use of pthread_attr_setstacksize
> @@ -338,6 +340,9 @@ PyThread_get_thread_native_id(void)
>  #elif defined(__NetBSD__)
>      lwpid_t native_id;
>      native_id = _lwp_self();
> +#elif defined(__GNU__) || defined(__FreeBSD_kernel__)
> +    pthread_t native_id;
> +    native_id = pthread_self();
>  #endif

pthread_self() is not the native id. PyThread_get_thread_ident() does
already return pthread_self(). PyThread_get_thread_native_id is really
expected to return the low-level OS id.

Samuel


Reply to: