This is the mail archive of the ecos-patches@sourceware.org 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: kernel/current/tests/klock failure


On Sun, Jun 10, 2007 at 11:30:39PM +0200, Hans Rosenfeld wrote:
> While running the klock test, I get the following error message:
> FAIL:<bad result from cyg_mbox[_timed]_get()> Line: 254, File: /usr/local/share/ecos/packages/kernel/current/tests/klock.c
> 
> What happens here is that while the first thread is waiting in
> cyg_mbox_get() for a message the second thread puts a message in the
> mailbox but immediately gets it back itself because it is not waiting
> for the first thread to change its state.
> 
> Putting a message in the mailbox is scheduling the first thread to run,
> but is not immediately causing a switch into it. I guess that is exactly
> as it is supposed to be.
> 
> I attached a simple patch to fix this by inserting a wait for the state
> change of the first thread.

Hi Hans

This patch looks correct. However i wonder why other people are not
seeing this failure?

Nick, Jifl, do you ever see this in your test farm?

      Andrew


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