未验证 提交 5b97a1a7 编写于 作者: O openharmony_ci 提交者: Gitee

!650 对生成handle流程增加锁操作

Merge pull request !650 from dhy308/gl-add_lock
......@@ -3010,6 +3010,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++) {
......@@ -3027,10 +3029,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.
先完成此消息的编辑!
想要评论请 注册