From owner-freebsd-hackers Tue Jun 19 14:36: 4 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from karon.dynas.se (karon.dynas.se [192.71.43.4]) by hub.freebsd.org (Postfix) with SMTP id 52B8E37B401 for ; Tue, 19 Jun 2001 14:35:59 -0700 (PDT) (envelope-from mikko@dynas.se) Received: (qmail 7111 invoked from network); 19 Jun 2001 21:35:56 -0000 Received: from spirit.sto.dynas.se (HELO spirit.dynas.se) (172.16.1.10) by 172.16.1.1 with SMTP; 19 Jun 2001 21:35:56 -0000 Received: (qmail 3886 invoked from network); 19 Jun 2001 21:33:24 -0000 Received: from explorer.rsa.com (10.81.217.59) by spirit.dynas.se with SMTP; 19 Jun 2001 21:33:24 -0000 Received: (from mikko@localhost) by explorer.rsa.com (8.11.3/8.11.3) id f5JLZqe56000; Tue, 19 Jun 2001 14:35:52 -0700 (PDT) (envelope-from mikko) Date: Tue, 19 Jun 2001 14:35:52 -0700 (PDT) From: Mikko Tyolajarvi Message-Id: <200106192135.f5JLZqe56000@explorer.rsa.com> To: ian@mecenia.org Cc: hackers@freebsd.org Subject: Re: pthread_attr_setscope(3) problem. Newsgroups: local.freebsd.hackers References: <3B2F9CC5.90607@mecenia.org> X-Newsreader: NN version 6.5.6 (NOV) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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