iob_tryalloc: Remove a wrong assertion

This commit is contained in:
YAMAMOTO Takashi 2021-07-19 19:35:57 +09:00 committed by Xiang Xiao
parent 98de773081
commit e96a870485
1 changed files with 3 additions and 1 deletions

View File

@ -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) && \