From fb5eb3a51db0632a0461c514721386cd5ae347c8 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Mon, 16 Aug 2021 06:22:31 +0000 Subject: [PATCH] Fixed bug #1170. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14654 27425a3e-05d8-49a3-a47f-9c15f0e5edd8 --- os/rt/src/chregistry.c | 4 ++-- readme.txt | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/os/rt/src/chregistry.c b/os/rt/src/chregistry.c index 8c52cf750..06bbde0c1 100644 --- a/os/rt/src/chregistry.c +++ b/os/rt/src/chregistry.c @@ -194,18 +194,18 @@ thread_t *chRegNextThread(thread_t *tp) { if (nqp == REG_HEADER(currcore)) { ntp = NULL; } -#if CH_CFG_USE_DYNAMIC == TRUE else { uint8_t *p = (uint8_t *)nqp; /*lint -save -e413 [1.3] Safe to subtract a calculated offset.*/ ntp = threadref((p - __CH_OFFSETOF(thread_t, rqueue))); /*lint -restore*/ +#if CH_CFG_USE_DYNAMIC == TRUE chDbgAssert(ntp->refs < (trefs_t)255, "too many references"); ntp->refs++; - } #endif + } chSysUnlock(); #if CH_CFG_USE_DYNAMIC == TRUE chThdRelease(tp); diff --git a/readme.txt b/readme.txt index b40d9d1ed..ea91c8fdd 100644 --- a/readme.txt +++ b/readme.txt @@ -74,6 +74,8 @@ ***************************************************************************** *** Next *** +- FIX: Fixed function chRegNextThread() broken when CH_CFG_USE_DYNAMIC + is disabled (bug #1170). - FIX: Fixed insufficient information in RT registry (bug #1169)(TBP). - FIX: Fixed code base not compatible with -Wcast-align=strict (bug #1168)(TBP). - FIX: Fixed wrong chconf.h for ADuCM36x demos (bug #1167)