[ECOS] some doubts in mlqueue.cxx code

sandeep shimple0@yahoo.com
Mon Nov 29 12:22:00 GMT 2004


>>>>- shouldn't it be "else timeslice_count.... = ..." ??
>> because if "queue->get_head() != thread", need_reschedule is set and that 
>> will take care of things in unlock_inner. if otherwise is the case then we 
>> need to reset the timeslice count as it can not be guaranteed that control 
>> will go to outer if (mentioned below) in unlock_inner.
oops! above should read as "will go IN outer if ..."

> This code deals with the case where the current thread is alone on the
> run queue. In that case needs_reschedule will not get set, but we must
> still reset the timeslice counter.
that's what i took it as, in above - lone thread on it's level.

> One of the changes was the move of resetting the counter out of the else 
> clause. I don't now recall what problem that fixed
may be, if in your free time you recall that or some other maintainer recalls
that, please let the list know. it's not blocking issue as of now.

may be things become clear then. as of now it is unclear.

though extra assignment doesn't harm in current case, as you say, and cost is
minimal. knowing the problem that you mentioned as the cause of removing else,
could be useful, who knows, in some other situation as well.

sandeep


		
__________________________________ 
Do you Yahoo!? 
Take Yahoo! Mail with you! Get it on your mobile phone. 
http://mobile.yahoo.com/maildemo 

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list