Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Jun 2001 14:35:52 -0700 (PDT)
From:      Mikko Tyolajarvi <mikko@dynas.se>
To:        ian@mecenia.org
Cc:        hackers@freebsd.org
Subject:   Re: pthread_attr_setscope(3) problem.
Message-ID:  <200106192135.f5JLZqe56000@explorer.rsa.com>
References:  <3B2F9CC5.90607@mecenia.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In local.freebsd.hackers you write:

>while porting a software to FreeBSD, I came across a problem with 
>pthread_attr_setscope(3). The software sets PTHREAD_SCOPE_SYSTEM 
>attribute. From the pthread_attr_setscope(3) implementation file, a 
>comment says that this attribute is unsupported (though the code doesn't 
>show that). Meanwhile, I've tried unsuccesfully other attributes. 
>Looking for futher insight, I have then wrote a little and simpler 
>program to test. Every attributes will just report ENOTSUP.

>I would like to get some inputs about how to fix that, if any possible. 
>Plus, I would like to know how does one detect whether or not that 
>function can be used.

FreeBSD's native threads are user-space only (= PTHREAD_SCOPE_PROCESS).

Just treat ENOTSUP (argument ok but not supported by implementation)
as a non-fatal error (= ignore it) and continue porting.  Or you can
comment out the call to pthread_attr_setscope().

If the program does a lot of disk I/O, or could benefit from multiple
CPUs, or you run into any other problems, you could try the
linuxthreads port.

  $.02,
  /Mikko
-- 
 Mikko Työläjärvi_______________________________________mikko@rsasecurity.com
 RSA Security

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200106192135.f5JLZqe56000>