This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit e96a87048586b830946bba177f553917802177ed Author: YAMAMOTO Takashi <[email protected]> AuthorDate: Mon Jul 19 19:35:57 2021 +0900 iob_tryalloc: Remove a wrong assertion --- mm/iob/iob_alloc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mm/iob/iob_alloc.c b/mm/iob/iob_alloc.c index 27e1200..d4c9e91 100644 --- a/mm/iob/iob_alloc.c +++ b/mm/iob/iob_alloc.c @@ -265,10 +265,12 @@ FAR struct iob_s *iob_tryalloc(bool throttled, enum iob_user_e consumerid) #if CONFIG_IOB_THROTTLE > 0 /* The throttle semaphore is a little more complicated because * it can be negative! Decrementing is still safe, however. + * + * Note: usually g_throttle_sem.semcount >= -CONFIG_IOB_THROTTLE. + * But it can be smaller than that if there are blocking threads. */ g_throttle_sem.semcount--; - DEBUGASSERT(g_throttle_sem.semcount >= -CONFIG_IOB_THROTTLE); #endif #if !defined(CONFIG_DISABLE_MOUNTPOINT) && defined(CONFIG_FS_PROCFS) && \
