This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Mutex, queue ...


On Mon, Jul 28, 2003 at 05:29:18PM +0200, Matthieu.GIRARDIN@fr.thalesgroup.com wrote:
> Excuse me but I have only one problem for you today...
> 
> I'm trying to use the cyg_mutex functions. I created a mutex with
> cyg_protocol_none (I don't remember the exact name but the meaning is the
> same; I'm on another computer...) and I test in what order functions are
> free.
> I have a problem always with the two first one.
> For exemple functions block on the mutex as : 1 then 2 then 3 ... 4 5 6 and
> they are free as : 2 then 1 then 3 ... 4 5 6.
> So I don't understand why... 

Do you mean that the order threads are unblocked from a cyg_mutex_lock
is not the same as the order they are blocked.

Correct. Nothing in the documentation says they should be.

In fact, the default is for the thread with the highest priority to be
unblocked first. 

          Andrew



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]