diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-12-21 15:50:33 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-12-21 15:50:33 +0000 |
commit | e8f4303a4c504b0dc3f0ed138b7532f9ffa84067 (patch) | |
tree | fa3440136b60c6e40280aec9b25039d30a7e6038 /testsuites/sptests/sp36 | |
parent | 2007-12-21 Xi Yang <hiyangxi@gmail.com> (diff) | |
download | rtems-e8f4303a4c504b0dc3f0ed138b7532f9ffa84067.tar.bz2 |
2007-12-21 Xi Yang <hiyangxi@gmail.com>
* Makefile.am, configure.ac: Add support for proper stacking of
priority inheritance on mutexes as well as enforce proper order of
release.
* sp36/.cvsignore, sp36/Makefile.am, sp36/sp36.doc,
sp36/sp36.scn: New files.
Diffstat (limited to 'testsuites/sptests/sp36')
-rw-r--r-- | testsuites/sptests/sp36/.cvsignore | 2 | ||||
-rw-r--r-- | testsuites/sptests/sp36/Makefile.am | 26 | ||||
-rw-r--r-- | testsuites/sptests/sp36/sp36.doc | 42 | ||||
-rw-r--r-- | testsuites/sptests/sp36/sp36.scn | 0 |
4 files changed, 70 insertions, 0 deletions
diff --git a/testsuites/sptests/sp36/.cvsignore b/testsuites/sptests/sp36/.cvsignore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/testsuites/sptests/sp36/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/testsuites/sptests/sp36/Makefile.am b/testsuites/sptests/sp36/Makefile.am new file mode 100644 index 0000000000..6e837e83e0 --- /dev/null +++ b/testsuites/sptests/sp36/Makefile.am @@ -0,0 +1,26 @@ +## +## $Id$ +## + +MANAGERS = all + +rtems_tests_PROGRAMS = sp36.exe +sp36_exe_SOURCES = strict_order_mut.c + +dist_rtems_tests_DATA = sp36.scn +dist_rtems_tests_DATA += sp36.doc + +include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg +include $(top_srcdir)/../automake/compile.am +include $(top_srcdir)/../automake/leaf.am + +AM_CPPFLAGS += -I$(top_srcdir)/../support/include + +LINK_OBJS = $(sp36_exe_OBJECTS) $(sp36_exe_LDADD) +LINK_LIBS = $(sp36_exe_LDLIBS) + +sp36.exe$(EXEEXT): $(sp36_exe_OBJECTS) $(sp36_exe_DEPENDENCIES) + @rm -f sp36.exe$(EXEEXT) + $(make-exe) + +include $(top_srcdir)/../automake/local.am diff --git a/testsuites/sptests/sp36/sp36.doc b/testsuites/sptests/sp36/sp36.doc new file mode 100644 index 0000000000..d67943b93a --- /dev/null +++ b/testsuites/sptests/sp36/sp36.doc @@ -0,0 +1,42 @@ +This is a simple test program to demonstrate strict order mutex. + +1)What's strict order mutex ? + + In rtems,when a task release a priority_inheritance or + priority ceiling semaphore,the kernel detect whether + this task holds priority_inheritance or priority + ceiling semaphore, if not, set the priority of task + back to real priority of task. + This method is right, but in theory, we would like + to reset the priority after releasing the mutex if + releasing it in LIFO order.Do it like this can decrease + the blocking time of a higher priority task . + +2)How to enable "strict order mutex " ? + + When configuring the rtems , add + ENABLE_STRICT_ORDER_MUTEX=1 + to your configure parameter. + + +3)About this test program + + T0,T1,S0,S1 + + T0,priority 4 + T1,priority 1 + + S0,priority inheritance + S1,priority ceiling,priority ceiling 1 + + 1,T0 obtain S0 then obtain S1, priority of T0 should be improved to 1 + 2,T0 try to release S0, but not in strict order, return error code + 3,T0 release S1,the priority of T0 back to 4 + 4,T1 try to obtain S0 + 5,T1 should be blocked and the priority of T0 should be improved to 1 + 6,T0 release S0 + 7,T1 obtain S0 + 8,OVER. + + + diff --git a/testsuites/sptests/sp36/sp36.scn b/testsuites/sptests/sp36/sp36.scn new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/testsuites/sptests/sp36/sp36.scn |