From owner-freebsd-hackers Wed Jan 10 20:42: 0 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from wartch.sapros.com (rularan.sapros.com [204.182.55.17]) by hub.freebsd.org (Postfix) with ESMTP id 0018537B400 for ; Wed, 10 Jan 2001 20:41:40 -0800 (PST) Received: from wartch.sapros.com (localhost [127.0.0.1]) by wartch.sapros.com (8.11.1/8.11.1) with ESMTP id f0B4fe008116 for ; Wed, 10 Jan 2001 20:41:40 -0800 (PST) (envelope-from peterh@wartch.sapros.com) Message-Id: <200101110441.f0B4fe008116@wartch.sapros.com> To: freebsd-hackers@freebsd.org Subject: pthread_attr_setschedparam, mozilla, and PTHREAD_MAX_PRIORITY Date: Wed, 10 Jan 2001 20:41:40 -0800 From: Peter Haight Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I rebuilt mozilla after upgrading to 4.2 and was getting an assertion because pthread_attr_setschedparam() was failing with a ENOTSUP. It turns out Mozilla was trying to set the thread priority to 42 which is above the new limit of 31 which changed a little before 4.2-RELEASE. To patch mozilla I had to do a '#if __FreeBSD_version >= 420000' because PTHREAD_MAX_PRIORITY is in a private pthreads header file. I'm wondering if it might not be a good idea to have that define show up somewhere public? The only other thing I can think of is to call pthread_attr_setschedparam() a couple of times to scope out the range of accepted values. Or maybe I'm missing some better solution. (I'm not on the list, so please cc me). To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message