mirror of
https://github.com/apache/nuttx.git
synced 2026-05-26 02:36:11 +08:00
drivers/rpmsg: no need check held status after change to rmutex
metal_mutex has been changed to rmutex_t, so do not need check the held status again. Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
This commit is contained in:
@@ -812,8 +812,7 @@ static void rpmsg_port_dump(FAR struct rpmsg_s *rpmsg)
|
||||
FAR struct metal_list *node;
|
||||
bool needunlock = false;
|
||||
|
||||
if (!up_interrupt_context() && !sched_idletask() &&
|
||||
!nxmutex_is_hold(&rdev->lock))
|
||||
if (!up_interrupt_context() && !sched_idletask())
|
||||
{
|
||||
metal_mutex_acquire(&rdev->lock);
|
||||
needunlock = true;
|
||||
|
||||
@@ -496,8 +496,7 @@ static void rpmsg_virtio_lite_dump(FAR struct rpmsg_s *rpmsg)
|
||||
return;
|
||||
}
|
||||
|
||||
if (up_interrupt_context() || sched_idletask() ||
|
||||
nxmutex_is_hold(&rdev->lock))
|
||||
if (up_interrupt_context() || sched_idletask())
|
||||
{
|
||||
needlock = false;
|
||||
}
|
||||
|
||||
@@ -711,8 +711,7 @@ static void rptun_dump(FAR struct rpmsg_s *rpmsg)
|
||||
return;
|
||||
}
|
||||
|
||||
if (up_interrupt_context() || sched_idletask() ||
|
||||
nxmutex_is_hold(&rdev->lock))
|
||||
if (up_interrupt_context() || sched_idletask())
|
||||
{
|
||||
needlock = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user