mirror of
https://github.com/apache/nuttx.git
synced 2026-08-31 22:23:03 +00:00
lib/backtrace:need init lock before use
Locks need to be initialized when they are declared. Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
parent
ee052a4570
commit
667171fbd8
1 changed files with 1 additions and 0 deletions
|
|
@ -134,6 +134,7 @@ static void backtrace_init(void)
|
|||
size_t i;
|
||||
|
||||
sq_init(&bp->freelist);
|
||||
spin_lock_init(&bp->lock);
|
||||
memset(bp->bucket, -1, sizeof(bp->bucket));
|
||||
for (i = 0; i < nitems(bp->pool); i++)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue