This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
Re: kernel/current/tests/klock failure
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Hans Rosenfeld <rosenfeld at grumpf dot hope-2000 dot org>
- Cc: ecos-patches at ecos dot sourceware dot org
- Date: Mon, 11 Jun 2007 13:58:09 +0200
- Subject: Re: kernel/current/tests/klock failure
- References: <20070610213039.GA26064@grumpf.hope-2000.org>
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