[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nptl] Re: NPTL issue with pthread_attr_setsched{param|policy}



Hello everybody! 
 
> This is very strange. I've verified already that it works as expected
> (and please consider the SCHED_RR sample we worked on some times ago, we
> made use of those primitives as well). 

I see. I need to add a couple of Gigabytes to my memory, and switch on the
Intelligency module, or something... 

> Are you sure you don't miss astep? IIRC, pthread_attr_setinheritsched, 
> pthread_attr_setschedparam and pthread_attr_setschedpolicy are needed 
> in order the change be considered. 

... Yeah, what a doofus, really! I forget to set inheritsched 
to EXPLICIT. 

But I still do not understand why it seems to work when switching to 
LinuxThreads. It should have equally failed? I'll check that as soon as I am
back in Frankfurt. 


> I'm not sure what POSIX requires if for example the sched
> policy was not specified, but (IIRC) the NPTL will ignore the request in
> this case (this should be verified, actually).

When inheritsched is set, thread should inherits the sched attributes. Which
is by default the case, and thus any created threads from /main/ runs by
default in SCHED_OTHER... Everything is consistent, and I am sure that such
a behavior is perfectly POSIXly correct. 


Thank you Seb for pointing out my mistake.
Loic.  

-- 
--
// Sender address goes to /dev/null (!!) 
// Use my 32/64 bits, ANSI C89, compliant email-address instead:   

unsigned y[]=
{0,34432,26811,16721,41866,63119,61007,48155,26147,10986};
void x(z){putchar(z);}; unsigned t; 
main(i){if(i<10){t=(y[i]*47560)%65521;x(t>>8);x(t&255);main(++i);}}

Geschenkt: 3 Monate GMX ProMail + 3 Ausgaben der TV Movie mit DVD
++++ Jetzt anmelden und testen http://www.gmx.net/de/go/mail ++++

Liste de diffusion nptl
Pour se désinscrire : mailto:nptl_request@bullopensource.org?subject=unsubscribe