This is the mail archive of the 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: Mailbox patch

"Christopher Cordahi" <> writes:

> Yes I agree, they basically are the same.
> If I understand correctly, the mboxt implementation decides which thread should
> receive a message at the time a get thread is to be released, whereas the mboxt2
> implementation decides which thread should receive a message while the thread
> doing the put is still running.

Yes, basically.

> Is this distinction important for UITRON compatibility?

The mboxt2 implementation was solely added for UITRON, since they have
these specific semantic requirements. Most of the cases where we have
alternative implementations are for UITRON, with a few options for

> > This also explains the code in the mboxt2 get() function you mention
> > above. If the get() function needs to wait, it knows that when it
> > wakes the put()er has already put a message in the destination
> > location, so all it needs to do is return.
> OK, I now understand the get function, but could there still be a
> problem in the put or in which thread is released.  Based on David's
> observations, the mboxt2 implementation seemed to lose data
> and receive garbage, whereas the mboxt implementation worked
> reliably.  Oh, btw, David was my colleague here at Nanometrics.

I couldn't see any obvious problems with the mboxt2 implementation. It
passes all the tests and nobody has complained about it before. The
problem may lie in the way that LWIP is using it, or may be down to
something like stack overflow or some other memory corruption.

However, I haven't spent an enormous amount of time looking at this,
so there may well be some subtle problem which has escaped me.

Nick Garnett                                 eCos Kernel Architect            The eCos and RedBoot experts

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