This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: [PATCH] (correction) tm_basic bug(?).
- From: Sergei Organov <osv at topconrd dot ru>
- To: Gary Thomas <gary at mlbassoc dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: 29 Nov 2004 17:53:42 +0300
- Subject: Re: [ECOS] [PATCH] (correction) tm_basic bug(?).
- References: <87mzx4l9am.fsf@osv.topcon.com> <1101501509.15525.29.camel@hermes>
Gary Thomas <gary@mlbassoc.com> writes:
> On Fri, 2004-11-26 at 12:06, Sergei Organov wrote:
> > Hi,
> >
> > The tm_basic kernel test hangs for me in mutex "Unlock/Lock test" when I
> > configure eCos so that all the mutexes are created with CEILING priority
> > inversion protocol by default and ceiling priority 0 (the default).
> >
[...]
> Feel free to suggest a patch for this scenario.
Sorry, I've made mistake in my previous post, -- setting ceiling before
mutex initialization, -- here is corrected patch:
Index: tm_basic.cxx
===================================================================
RCS file: /cvs/ecos/ecos/packages/kernel/current/tests/tm_basic.cxx,v
retrieving revision 1.20
diff -u -r1.20 tm_basic.cxx
--- tm_basic.cxx 6 May 2003 16:10:14 -0000 1.20
+++ tm_basic.cxx 29 Nov 2004 14:51:32 -0000
@@ -818,6 +818,9 @@
cyg_thread_set_priority(cyg_thread_self(), 4);
// Set up for full mutex unlock/lock test
cyg_mutex_init(&test_mutexes[0]);
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_CEILING
+ cyg_mutex_set_ceiling(&test_mutexes[0], 4);
+#endif
cyg_semaphore_init(&synchro, 0);
cyg_thread_create(3, // Priority - just a number
mutex_test, // entry
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss