Misc on RBTree Thread Queue Priority Discipline Changes

Joel Sherrill joel.sherrill at oarcorp.com
Tue Jul 8 21:37:29 UTC 2014


If you take the patches in their entirety, most of the tests
appear to be about 500 bytes smaller on the erc32.

None of the tmtests do priority based blocking so I can't
report any changes there.

There was historically a subroutine in the threadq calls for a discipline
specific routine. Using the RBTree, this resulted in only 3-5 lines
of code unique to the discipline in those discipline files. The other
20+ lines was duplicated. The last patch folds those subroutines into
the main methods.

There is still some room for clean up since the code that is in
threadblockingoperationcancel.c is open coded there and
three other places. So there are a total of four copies of this
code in the tree.

+ rtems/src/eventsurrender.c
+ score/src/threadqdequeue.c
+ score/src/threadqextract.c
+ score/src/threadblockingoperationcancel.c

Two of those need the debug check code and two do not.
Also the method name isn't right for all four cases. It indicates
its use on the "resource released in ISR" usage not the
normal "clean up from blocking" case.

Suggestions on a new name and whether this should be
a real subroutine or a static inline is appreciated. Then I
can rework and reduce the code duplication.

Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985

More information about the devel mailing list