libc: Add debug assert to prevent tls allocation failure
So It's easy to find TASK_TLS_ELEM not enough error. Signed-off-by: zhangbo56 <zhangbo56@xiaomi.com>
This commit is contained in:
parent
05ba822c41
commit
0496984338
|
@ -31,6 +31,7 @@
|
|||
|
||||
#include <nuttx/tls.h>
|
||||
#include <nuttx/mutex.h>
|
||||
#include <assert.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
|
@ -104,6 +105,9 @@ int task_tls_alloc(tls_dtor_t dtor)
|
|||
}
|
||||
|
||||
nxmutex_unlock(&g_tlslock);
|
||||
|
||||
DEBUGASSERT(ret != -EUSERS);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue