Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Jul 2003 06:04:43 +0800
From:      "David Xu" <davidxu@freebsd.org>
To:        "John Baldwin" <jhb@freebsd.org>, "Terry Lambert" <tlambert2@mindspring.com>, <deischen@freebsd.org>
Cc:        threads@freebsd.org
Subject:   Re: libc_r silliness
Message-ID:  <001201c3459c$f0f66480$0701a8c0@tiger>
References:  <Pine.GSO.4.10.10307071543570.15065-100000@pcnet5.pcnet.com><3F0A9E8E.99CA9BD@mindspring.com> <200307080923.20011.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

----- Original Message -----=20
From: "John Baldwin" <jhb@FreeBSD.org>
To: "Terry Lambert" <tlambert2@mindspring.com>; <deischen@FreeBSD.org>
Cc: <threads@FreeBSD.org>
Sent: Tuesday, July 08, 2003 9:23 PM
Subject: Re: libc_r silliness


> On Tuesday 08 July 2003 06:35 am, Terry Lambert wrote:
> > Daniel Eischen wrote:
> > > On Mon, 7 Jul 2003, John Baldwin wrote:
> > > > > I don't really know how to handle this.  We can wrap
> > > > > sched_get_priority_{min,max}(), but how do we know whether
> > > > > the application wants process priorities or thread
> > > > > priorities?
> > > >
> > > > Ugh.  Perhaps the manpage should at least be updated to not
> > > > reference the macros.  What does POSIX say about the confusion
> > > > between sched_get_priority_{min,max}?
> > >
> > > Sure, update the man pages if you want ;-)
> > >
> > > I have not found anything yet regarding =
sched_get_priority_{min,max}
> > > confusion in the POSIX spec...
> >
> > =
http://www.opengroup.org/onlinepubs/007904975/functions/sched_get_priorit=
y_
> >max.html
> >
> > The functions take a policy parameter; they are supposed to
> > return "appropriate" values, which I took to mean "appropriate
> > to the policy parameter supplied at the time they were called":
> >
> > int sched_get_priority_max(int policy);
> > int sched_get_priority_min(int policy);
> >
> > The sched_get_priority_max() and sched_get_priority_min()
> > functions shall return the appropriate maximum or minimum,
> > respectively, for the scheduling policy specified by policy.
>=20
> Yes, but in a multithreaded program when I call=20
> sched_get_priority_max(SCHED_RR), does that tell me the maximum =
process=20
> SCHED_RR priority for use with sched_setschedparam() or does it tell =
me the=20
> maximum thread SCHED_RR priority for use with pthread_setschedparam()?
>=20
See page:
http://www.opengroup.org/onlinepubs/007904975/basedefs/sched.h.html
They are marked with 'TPS' code, so they are applied to thread =
scheduling.
Otherwise, they should be marked with 'PS' code.
This is the code page:
http://www.opengroup.org/onlinepubs/007904975/help/codes.html


> --=20
>=20
> John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
> "Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/
> _______________________________________________
> freebsd-threads@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-threads
> To unsubscribe, send any mail to =
"freebsd-threads-unsubscribe@freebsd.org"
>=20

David Xu



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001201c3459c$f0f66480$0701a8c0>