mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 01:21:26 +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;
|
FAR struct metal_list *node;
|
||||||
bool needunlock = false;
|
bool needunlock = false;
|
||||||
|
|
||||||
if (!up_interrupt_context() && !sched_idletask() &&
|
if (!up_interrupt_context() && !sched_idletask())
|
||||||
!nxmutex_is_hold(&rdev->lock))
|
|
||||||
{
|
{
|
||||||
metal_mutex_acquire(&rdev->lock);
|
metal_mutex_acquire(&rdev->lock);
|
||||||
needunlock = true;
|
needunlock = true;
|
||||||
|
|||||||
@@ -496,8 +496,7 @@ static void rpmsg_virtio_lite_dump(FAR struct rpmsg_s *rpmsg)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (up_interrupt_context() || sched_idletask() ||
|
if (up_interrupt_context() || sched_idletask())
|
||||||
nxmutex_is_hold(&rdev->lock))
|
|
||||||
{
|
{
|
||||||
needlock = false;
|
needlock = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -711,8 +711,7 @@ static void rptun_dump(FAR struct rpmsg_s *rpmsg)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (up_interrupt_context() || sched_idletask() ||
|
if (up_interrupt_context() || sched_idletask())
|
||||||
nxmutex_is_hold(&rdev->lock))
|
|
||||||
{
|
{
|
||||||
needlock = false;
|
needlock = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user