提交 3b9e3f84 编写于 作者: O openharmony_ci 提交者: Gitee

!438 解决shm接口死锁问题

Merge pull request !438 from JerryH/shm
......@@ -742,6 +742,7 @@ INT32 ShmDt(const VOID *shmaddr)
/* remove it from aspace */
LOS_RbDelNode(&space->regionRbTree, &region->rbNode);
LOS_ArchMmuUnmap(&space->archMmu, region->range.base, region->range.size >> PAGE_SHIFT);
(VOID)LOS_MuxRelease(&space->regionMux);
/* free it */
free(region);
......@@ -750,7 +751,7 @@ INT32 ShmDt(const VOID *shmaddr)
if (seg == NULL) {
ret = EINVAL;
SYSV_SHM_UNLOCK();
goto ERROR_WITH_LOCK;
goto ERROR;
}
ShmPagesRefDec(seg);
......@@ -763,7 +764,7 @@ INT32 ShmDt(const VOID *shmaddr)
seg->ds.shm_lpid = LOS_GetCurrProcessID();
}
SYSV_SHM_UNLOCK();
(VOID)LOS_MuxRelease(&space->regionMux);
return 0;
ERROR_WITH_LOCK:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册