Fixed bug 2971878 .
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1747 35acf78f-673a-0410-8e92-d51de3d6d3f4master
parent
ad3d21e815
commit
392c2fe70d
|
@ -92,7 +92,7 @@ Settings: SYSCLK=80, optimal wait states, prefetching enabled
|
||||||
--- Result: SUCCESS
|
--- Result: SUCCESS
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--- Test Case 11.1 (Benchmark, messages #1)
|
--- Test Case 11.1 (Benchmark, messages #1)
|
||||||
--- Score : 280180 msgs/S, 560360 ctxswc/S
|
--- Score : 280181 msgs/S, 560362 ctxswc/S
|
||||||
--- Result: SUCCESS
|
--- Result: SUCCESS
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--- Test Case 11.2 (Benchmark, messages #2)
|
--- Test Case 11.2 (Benchmark, messages #2)
|
||||||
|
@ -128,7 +128,7 @@ Settings: SYSCLK=80, optimal wait states, prefetching enabled
|
||||||
--- Result: SUCCESS
|
--- Result: SUCCESS
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--- Test Case 11.10 (Benchmark, virtual timers set/reset)
|
--- Test Case 11.10 (Benchmark, virtual timers set/reset)
|
||||||
--- Score : 1093664 timers/S
|
--- Score : 1093672 timers/S
|
||||||
--- Result: SUCCESS
|
--- Result: SUCCESS
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--- Test Case 11.11 (Benchmark, semaphores wait/signal)
|
--- Test Case 11.11 (Benchmark, semaphores wait/signal)
|
||||||
|
|
|
@ -23,6 +23,16 @@
|
||||||
*
|
*
|
||||||
* @addtogroup registry
|
* @addtogroup registry
|
||||||
* @details Threads Registry related APIs and services.<br>
|
* @details Threads Registry related APIs and services.<br>
|
||||||
|
* The threads Threads Registry is a double linked list that holds
|
||||||
|
* all the active threads in the system.<br>
|
||||||
|
* The registry is meant to be mainly a debug feature, as example
|
||||||
|
* through the registry a debugger can enumerate the active threads
|
||||||
|
* in any given moment or the shell can print the active threads and
|
||||||
|
* their state.<br>
|
||||||
|
* Another possible use is for centralized threads memory management,
|
||||||
|
* terminating threads can pulse an event source and an event handler
|
||||||
|
* can perform a scansion of the registry in order to recover the
|
||||||
|
* memory.<br>
|
||||||
* In order to use the threads registry the @p CH_USE_REGISTRY option
|
* In order to use the threads registry the @p CH_USE_REGISTRY option
|
||||||
* must be enabled in @p chconf.h.
|
* must be enabled in @p chconf.h.
|
||||||
* @{
|
* @{
|
||||||
|
@ -64,25 +74,24 @@ Thread *chRegFirstThread(void) {
|
||||||
* @retval NULL if there is no next thread.
|
* @retval NULL if there is no next thread.
|
||||||
*/
|
*/
|
||||||
Thread *chRegNextThread(Thread *tp) {
|
Thread *chRegNextThread(Thread *tp) {
|
||||||
|
Thread *ntp;
|
||||||
|
|
||||||
chSysLock();
|
chSysLock();
|
||||||
|
ntp = tp->p_newer;
|
||||||
|
if (ntp == (Thread *)&rlist)
|
||||||
|
ntp = NULL;
|
||||||
#if CH_USE_DYNAMIC
|
#if CH_USE_DYNAMIC
|
||||||
chDbgAssert(tp->p_refs > 0, "chRegNextThread(), #1",
|
else {
|
||||||
"not referenced");
|
chDbgAssert(ntp->p_refs < 255, "chRegNextThread(), #1",
|
||||||
tp->p_refs--;
|
|
||||||
#endif
|
|
||||||
if (tp->p_newer != (Thread *)&rlist) {
|
|
||||||
tp = tp->p_newer;
|
|
||||||
#if CH_USE_DYNAMIC
|
|
||||||
chDbgAssert(tp->p_refs < 255, "chRegNextThread(), #2",
|
|
||||||
"too many references");
|
"too many references");
|
||||||
tp->p_refs++;
|
ntp->p_refs++;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else
|
#endif
|
||||||
tp = NULL;
|
|
||||||
chSysUnlock();
|
chSysUnlock();
|
||||||
return tp;
|
#if CH_USE_DYNAMIC
|
||||||
|
chThdRelease(tp);
|
||||||
|
#endif
|
||||||
|
return ntp;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CH_USE_REGISTRY */
|
#endif /* CH_USE_REGISTRY */
|
||||||
|
|
15
readme.txt
15
readme.txt
|
@ -57,7 +57,14 @@
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
|
|
||||||
*** 1.5.4 ***
|
*** 1.5.4 ***
|
||||||
|
- FIX: Fixed missing memory recovery on reference release in chRegNextThread()
|
||||||
|
(bug 2971878).
|
||||||
- FIX: Fixed wrong thread state macro in STM32/spi_lld.c (bug 2968142).
|
- FIX: Fixed wrong thread state macro in STM32/spi_lld.c (bug 2968142).
|
||||||
|
- NEW: The port layer now can "capture" the implementation of individual
|
||||||
|
scheduler API functions in order to provide architecture-optimized
|
||||||
|
versions. This is done because further scheduler optimizations are
|
||||||
|
becoming increasingly pointless without considering architecture and
|
||||||
|
compiler related constraints.
|
||||||
- NEW: Added support for the STM8 large memory model to the STM8 port. Now
|
- NEW: Added support for the STM8 large memory model to the STM8 port. Now
|
||||||
the assembler port code is totally inlined and the chcoreasm.asm file has
|
the assembler port code is totally inlined and the chcoreasm.asm file has
|
||||||
been removed.
|
been removed.
|
||||||
|
@ -65,11 +72,6 @@
|
||||||
subdirectory, this should make things easier for RIDE7 users. The normal
|
subdirectory, this should make things easier for RIDE7 users. The normal
|
||||||
makefile is still available of course.
|
makefile is still available of course.
|
||||||
- NEW: New article in the documentation. Fixed an orphaned page (STM8 port).
|
- NEW: New article in the documentation. Fixed an orphaned page (STM8 port).
|
||||||
- NEW: The port layer now can "capture" the implementation of individual
|
|
||||||
scheduler API functions in order to provide architecture-optimized
|
|
||||||
versions. This is done because further scheduler optimizations are
|
|
||||||
becoming increasingly pointless without considering architecture and
|
|
||||||
compiler related constraints.
|
|
||||||
- NEW: Documentation improvements, now the description goes on top of each
|
- NEW: Documentation improvements, now the description goes on top of each
|
||||||
page, doxygen defaulted it in the middle, not exactly the best for
|
page, doxygen defaulted it in the middle, not exactly the best for
|
||||||
readability. Improved many descriptions of the various subsystems.
|
readability. Improved many descriptions of the various subsystems.
|
||||||
|
@ -80,6 +82,9 @@
|
||||||
The previous implementation was probably overkill and took too much space.
|
The previous implementation was probably overkill and took too much space.
|
||||||
- CHANGE: Exiting from a chCondWaitTimeout() because a timeout now does not
|
- CHANGE: Exiting from a chCondWaitTimeout() because a timeout now does not
|
||||||
re-acquire the mutex, ownership is lost.
|
re-acquire the mutex, ownership is lost.
|
||||||
|
- CHANGE: The module documentation has been moved from the kernel.dox file
|
||||||
|
to the various source code files in order to make it easier to maintain
|
||||||
|
and double as source comments.
|
||||||
|
|
||||||
*** 1.5.3 ***
|
*** 1.5.3 ***
|
||||||
- FIX: Removed C99-style variables declarations (bug 2964418)(backported
|
- FIX: Removed C99-style variables declarations (bug 2964418)(backported
|
||||||
|
|
Loading…
Reference in New Issue