pm: add lock for pm_auto_updatestate_cb()
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
43d2c595b1
commit
d2ef505684
@ -42,9 +42,14 @@ static void pm_auto_updatestate_cb(FAR void *arg)
|
||||
{
|
||||
int domain = (uintptr_t)arg;
|
||||
enum pm_state_e newstate;
|
||||
irqstate_t flags;
|
||||
|
||||
flags = pm_lock(domain);
|
||||
|
||||
newstate = pm_checkstate(domain);
|
||||
pm_changestate(domain, newstate);
|
||||
|
||||
pm_unlock(domain, flags);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user