cvs commit: src/lib/libpthread Makefile

walt wa1ter at myrealbox.com
Fri Dec 14 16:24:51 PST 2007


On Fri, 14 Dec 2007, Matthew Dillon wrote:

>
> :Simon Schubert wrote:
> :>   Log:
> :>   Switch to libthread_xu per default...


>     I think its a good idea.  It needs wider testing and people can always
>     switch back if they hit problems.

I found a problem with libthread_xu -- when trying to download a file
with firefox the 'file download' dialog box crashes with this error:

GThread-ERROR **: file gthread-posix.c: line 348 (): error 'Operation
not supported' during 'pthread_attr_setschedparam (&attr, &sched)'
aborting...

When I switch back to libc_r the problem goes away.

This is one relevant-looking section of gthread-posix.c which is
customized for FreeBSD.  I'm wondering if it should also apply to
DragonFly:

#if defined (POSIX_MIN_PRIORITY) && defined (POSIX_MAX_PRIORITY) &&
defined(_POSIX_THREAD_PRIORITY_SCHEDULING)
# define HAVE_PRIORITIES 1
static gint priority_normal_value;
# ifdef __FreeBSD__
   /* FreeBSD threads use different priority values from the POSIX_
    * defines so we just set them here. The corresponding macros
    * PTHREAD_MIN_PRIORITY and PTHREAD_MAX_PRIORITY are implied to be
    * exported by the docs, but they aren't.
    */
#  define PRIORITY_LOW_VALUE      0
#  define PRIORITY_URGENT_VALUE   31
# else /* !__FreeBSD__ */
#  define PRIORITY_LOW_VALUE      POSIX_MIN_PRIORITY
#  define PRIORITY_URGENT_VALUE   POSIX_MAX_PRIORITY
# endif /* !__FreeBSD__ */
# define PRIORITY_NORMAL_VALUE    priority_normal_value
#endif /* POSIX_MIN_PRIORITY && POSIX_MAX_PRIORITY */

In any case, as I said, this bug happens only when using
libthread_xu.






More information about the Commits mailing list