[LWN Logo]

To: corbet-lwn@eklektix.com
Subject: threads
Date: Wed, 13 May 1998 11:58:09 -0500
From: Jonathan Corbet <corbet@atd.ucar.edu>

Path: ncar!newsxfer.itd.umich.edu!sunqbc.risq.qc.ca!newsfeed.nacamar.de!univ-lyon1.fr!unice.fr!news-sop.inria.fr!news-rocq.inria.fr!usenet
From: Xavier Leroy <Xavier.Leroy@see.my.sig.for.address>
Newsgroups: comp.programming.threads,comp.os.linux.development.system
Subject: Re: linuxthreads and scheduling
Date: 13 May 1998 08:46:36 +0000
Organization: INRIA Rocquencourt, projet Cristal
Lines: 26
Sender: xleroy@cadet.inria.fr
Message-ID: <lyz67japngz.fsf@cadet.inria.fr>
References: <3558993F.DEA99D7D@mistral.co.uk>
NNTP-Posting-Host: cadet.inria.fr
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: Gnus v5.3/Emacs 19.34
Xref: ncar comp.programming.threads:5684 comp.os.linux.development.system:27435

Stuart Hughes <sehughes@mistral.co.uk> writes:

> I just got David Butenhof's programming with POSIX threads which I
> highly recommend.  I'm having a problem getting some of the examples to
> run.  Although the calls to set the scheduling to FIFO don't return
> errors, when I do a pthread_getschedparam nothing seems to have changed.

You're probably using LinuxThreads 0.5 on a x86 processor.  This
version has a bug in an asm wrapper that causes pthread_setschedparam
to do nothing.  Your program works fine under LinuxThreads 0.7.

> I am running as root, on a redhat 4.2 that has been upgraded to kernel
> 2.0.33 and libc 5.4.44.

The best thing to do is to upgrade to RedHat 5.0, which has much
better thread support (glibc 2 and LinuxThreads 0.7).  If you want to
stay with libc 5, you can still find a more recent version of
LinuxThreads at
ftp://ftp.inria.fr/INRIA/Projects/cristal/Xavier.Leroy/linuxthreads.tar.gz

- Xavier Leroy

-- 
Valid e-mail address (without the underscores): Xavier.Leroy@i_n_r_i_a.f_r
This is a protection against junk mail. Apologies for the inconvenience.
Home page: http://pauillac.inria.fr/~xleroy/