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: tm_basic bug(?).


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.

Here is the 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:46:18 -0000
@@ -816,6 +816,9 @@
     int i;
     // Set my priority lower than any I plan to create
     cyg_thread_set_priority(cyg_thread_self(), 4);
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_CEILING
+    cyg_mutex_set_ceiling(&test_mutexes[0], 4);
+#endif
     // Set up for full mutex unlock/lock test
     cyg_mutex_init(&test_mutexes[0]);
     cyg_semaphore_init(&synchro, 0);


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


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