[ECOS] suspend/resume nesting

Koeller, T. Thomas.Koeller@baslerweb.com
Wed May 21 09:42:00 GMT 2003

How would A release the scheduler lock while being

Anyway, this is not my point. Most responses to
my original posting have been of the kind 'I am
not using it, so I do not care whether it is usable
or not'.

Now if somebody decides for himself that he does
not want to use suspend/resume for one reason or
another, that's perfectly fine for me. But I _do_
want to use them, and as they are official API
functions I should be able to do so. The alternative
would be to remove those functions from the API
(less preferable to me) or to warn  any users
about the current implementation deficiencies
(the least desirable alternative, I'd rather
fix it).


> -----Original Message-----
> From: sandeep [mailto:sandeep@codito.com]
> Sent: Wednesday, May 21, 2003 5:45 AM
> To: Koeller, T.
> Cc: ecos-discuss (E-Mail)
> Subject: Re: [ECOS] suspend/resume nesting

> what about following solution to your requirements (for sake 
> of simplicity
> sched_lock is initially chosen to be 0, though it could be 
> any other non-zero 
> value too, except that in that case unlock_inner will be 
> called later, when 
> sched_lock goes 0) --
> [sched_lock = 0]
> <i> A takes schedular_lock
> [sched_lock = 1]
> <ii> A invokes resume for B [sched_lock goes 1->2->1 in this call]
> [sched_lock = 1]
> <iii> A invokes suspend for itself [sched_lock goes 1->2->1 
> in this call]
> [sched_lock = 1]
> <iv> A releases schedular_lock
> [sched_lock goes to 0 resulting in call to unlock_inner 
> causing A to be taken 
> off and B to be brought in]
> exchange positions of A and B in above explanation and you 
> will get what you 
> will need to do on B's side.
> regards
> sandeep

Thomas Koeller, Software Development 

Basler Vision Technologies 
An der Strusbek 60-62 
22926 Ahrensburg 

Tel +49 (4102) 463-390 
Fax +49 (4102) 463-46390


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

More information about the Ecos-discuss mailing list