mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 04:52:02 +08:00
cxd56xx: rm sched_[un]lock
According to the current implementation, "cxd56_cpu1siguninit" will only be called once during the NuttX startup phase, and it won't involve scenarios of multi-threaded concurrent access. Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
@@ -169,8 +169,6 @@ int cxd56_cpu1siginit(uint8_t sigtype, void *data)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
sched_lock();
|
||||
|
||||
if (priv->sigtype[sigtype].use)
|
||||
{
|
||||
ret = -EBUSY;
|
||||
@@ -188,8 +186,6 @@ int cxd56_cpu1siginit(uint8_t sigtype, void *data)
|
||||
|
||||
priv->ndev++;
|
||||
|
||||
sched_unlock();
|
||||
|
||||
cxd56_iccinit(CXD56_PROTO_GNSS);
|
||||
|
||||
ret = cxd56_iccinitmsg(CXD56CPU1_CPUID);
|
||||
@@ -221,7 +217,6 @@ err0:
|
||||
return ret;
|
||||
|
||||
err1:
|
||||
sched_unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -236,12 +231,9 @@ int cxd56_cpu1siguninit(uint8_t sigtype)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
sched_lock();
|
||||
|
||||
if (!priv->sigtype[sigtype].use)
|
||||
{
|
||||
ret = -EBUSY;
|
||||
sched_unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -258,8 +250,6 @@ int cxd56_cpu1siguninit(uint8_t sigtype)
|
||||
pid = priv->workerpid;
|
||||
priv->workerpid = INVALID_PROCESS_ID;
|
||||
|
||||
sched_unlock();
|
||||
|
||||
ret = kthread_delete(pid);
|
||||
|
||||
if (ret)
|
||||
|
||||
Reference in New Issue
Block a user