Skip to content

Commit

Permalink
sys/pm_layered: add debugging outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
jue89 committed Oct 31, 2022
1 parent 75295df commit 4b802ad
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sys/pm_layered/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ void pm_block(unsigned mode)
{
assert(pm_blocker.blockers[mode] != 255);

DEBUG("[pm_layered] pm_block(%d)\n", mode);

unsigned state = irq_disable();
pm_blocker.blockers[mode]++;
irq_restore(state);
Expand All @@ -88,6 +90,8 @@ void pm_unblock(unsigned mode)
{
assert(pm_blocker.blockers[mode] > 0);

DEBUG("[pm_layered] pm_unblock(%d)\n", mode);

unsigned state = irq_disable();
pm_blocker.blockers[mode]--;
irq_restore(state);
Expand Down

0 comments on commit 4b802ad

Please sign in to comment.