-
Notifications
You must be signed in to change notification settings - Fork 2.1k
cpu/cortexm_common: irq_enable returns the current state of interrupts (not previous) #10076
Copy link
Copy link
Closed
Labels
Area: coreArea: RIOT kernel. Handle PRs marked with this with care!Area: RIOT kernel. Handle PRs marked with this with care!Platform: ARMPlatform: This PR/issue effects ARM-based platformsPlatform: This PR/issue effects ARM-based platformsType: bugThe issue reports a bug / The PR fixes a bug (including spelling errors)The issue reports a bug / The PR fixes a bug (including spelling errors)Type: questionThe issue poses a question regarding usage of RIOTThe issue poses a question regarding usage of RIOT
Description
Description
I'm opening an issue and not a PR because I'm not sure that this is a bug.
See
RIOT/cpu/cortexm_common/irq_arch.c
Line 38 in b4664a5
| __attribute__((used)) unsigned int irq_enable(void) |
I would expect irq_enable() to return the state of the interrup mask previous to them being enabled. This is what irq_disable() does.
Does this make sense? I searched the codebase and this function is used sparingly and the result is never used, so if it is a bug it is asymptomatic now.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area: coreArea: RIOT kernel. Handle PRs marked with this with care!Area: RIOT kernel. Handle PRs marked with this with care!Platform: ARMPlatform: This PR/issue effects ARM-based platformsPlatform: This PR/issue effects ARM-based platformsType: bugThe issue reports a bug / The PR fixes a bug (including spelling errors)The issue reports a bug / The PR fixes a bug (including spelling errors)Type: questionThe issue poses a question regarding usage of RIOTThe issue poses a question regarding usage of RIOT