提交 810a6d83 编写于 作者: D dhy308

在分配handle时增加锁操作

Signed-off-by: Ndhy308 <tony.gan@huawei.com>
上级 6785bd2c
......@@ -3018,6 +3018,8 @@ static void *dlopen_impl(
return p;
}
pthread_rwlock_wrlock(&lock);
p->nr_dlopen++;
if (p->bfs_built) {
for (int i = 0; p->deps[i]; i++) {
......@@ -3035,10 +3037,12 @@ static void *dlopen_impl(
LD_LOGE("dlopen_impl: generate random handle failed");
do_dlclose(p);
}
pthread_rwlock_unlock(&lock);
return handle;
#endif
pthread_rwlock_unlock(&lock);
return p;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册