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
|
||||
----------------------------------------------------------------------------
|
||||
--- Test Case 11.1 (Benchmark, messages #1)
|
||||
--- Score : 280180 msgs/S, 560360 ctxswc/S
|
||||
--- Score : 280181 msgs/S, 560362 ctxswc/S
|
||||
--- Result: SUCCESS
|
||||
----------------------------------------------------------------------------
|
||||
--- Test Case 11.2 (Benchmark, messages #2)
|
||||
|
@ -128,7 +128,7 @@ Settings: SYSCLK=80, optimal wait states, prefetching enabled
|
|||
--- Result: SUCCESS
|
||||
----------------------------------------------------------------------------
|
||||
--- Test Case 11.10 (Benchmark, virtual timers set/reset)
|
||||
--- Score : 1093664 timers/S
|
||||
--- Score : 1093672 timers/S
|
||||
--- Result: SUCCESS
|
||||
----------------------------------------------------------------------------
|
||||
--- Test Case 11.11 (Benchmark, semaphores wait/signal)
|
||||
|
|
|
@ -23,6 +23,16 @@
|
|||
*
|
||||
* @addtogroup registry
|
||||
* @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
|
||||
* must be enabled in @p chconf.h.
|
||||
* @{
|
||||
|
@ -64,25 +74,24 @@ Thread *chRegFirstThread(void) {
|
|||
* @retval NULL if there is no next thread.
|
||||
*/
|
||||
Thread *chRegNextThread(Thread *tp) {
|
||||
Thread *ntp;
|
||||
|
||||
chSysLock();
|
||||
ntp = tp->p_newer;
|
||||
if (ntp == (Thread *)&rlist)
|
||||
ntp = NULL;
|
||||
#if CH_USE_DYNAMIC
|
||||
chDbgAssert(tp->p_refs > 0, "chRegNextThread(), #1",
|
||||
"not referenced");
|
||||
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",
|
||||
else {
|
||||
chDbgAssert(ntp->p_refs < 255, "chRegNextThread(), #1",
|
||||
"too many references");
|
||||
tp->p_refs++;
|
||||
#endif
|
||||
ntp->p_refs++;
|
||||
}
|
||||
else
|
||||
tp = NULL;
|
||||
#endif
|
||||
chSysUnlock();
|
||||
return tp;
|
||||
#if CH_USE_DYNAMIC
|
||||
chThdRelease(tp);
|
||||
#endif
|
||||
return ntp;
|
||||
}
|
||||
|
||||
#endif /* CH_USE_REGISTRY */
|
||||
|
|
15
readme.txt
15
readme.txt
|
@ -57,7 +57,14 @@
|
|||
*****************************************************************************
|
||||
|
||||
*** 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).
|
||||
- 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
|
||||
the assembler port code is totally inlined and the chcoreasm.asm file has
|
||||
been removed.
|
||||
|
@ -65,11 +72,6 @@
|
|||
subdirectory, this should make things easier for RIDE7 users. The normal
|
||||
makefile is still available of course.
|
||||
- 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
|
||||
page, doxygen defaulted it in the middle, not exactly the best for
|
||||
readability. Improved many descriptions of the various subsystems.
|
||||
|
@ -80,6 +82,9 @@
|
|||
The previous implementation was probably overkill and took too much space.
|
||||
- CHANGE: Exiting from a chCondWaitTimeout() because a timeout now does not
|
||||
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 ***
|
||||
- FIX: Removed C99-style variables declarations (bug 2964418)(backported
|
||||
|
|
Loading…
Reference in New Issue