Add new user_irq claim APIs to make it easier for independent code using them to interoperate #854

Merged
kilograham merged 2 commits from user_irq_claim into develop 2022-06-07 14:27:38 -05:00
kilograham commented 2022-06-06 13:28:52 -05:00 (Migrated from github.com)
No description provided.
lurch (Migrated from github.com) reviewed 2022-06-06 13:35:16 -05:00
@ -289,6 +289,69 @@ void irq_set_pending(uint num);
* \note This is an internal method and user should generally not call it.
lurch (Migrated from github.com) commented 2022-06-06 13:35:15 -05:00

Does "entirely core local" mean that each core has it's own independent set of User IRQs? Might be worth being slightly more verbose? 🤷

Does "entirely core local" mean that each core has it's own independent set of User IRQs? Might be worth being slightly more verbose? :shrug:
lurch (Migrated from github.com) reviewed 2022-06-06 13:41:50 -05:00
@ -410,3 +413,31 @@ void irq_init_priorities() {
}
lurch (Migrated from github.com) commented 2022-06-06 13:41:50 -05:00

Is it worth reusing get_user_irq_claim_index here?
EDIT: Ah no, my mistake, I think what you're doing here is the inverse of get_user_irq_claim_index, it's just that the maths is the same for both 😉 (5 - 1 = 4 and 5 - 4 = 1)

(also, weird spacing here, with double space after = and no space between - and 1)

~~Is it worth reusing `get_user_irq_claim_index` here?~~ EDIT: Ah no, my mistake, I think what you're doing here is the _inverse_ of `get_user_irq_claim_index`, it's just that the maths is the same for both :wink: (`5 - 1 = 4` and `5 - 4 = 1`) (also, weird spacing here, with double space after `=` and no space between `-` and `1`)
lurch (Migrated from github.com) reviewed 2022-06-06 14:02:14 -05:00
@ -39,9 +39,9 @@
#define PICO_STDIO_USB_TASK_INTERVAL_US 1000
lurch (Migrated from github.com) commented 2022-06-06 14:02:14 -05:00

I wonder if it's worth removing the PICO_CONFIG line, given that we now don't expect people to provide an explicit PICO_STDIO_USB_LOW_PRIORITY_IRQ? 🤔

I wonder if it's worth removing the PICO_CONFIG line, given that we now don't _expect_ people to provide an explicit `PICO_STDIO_USB_LOW_PRIORITY_IRQ`? :thinking:
Wren6991 (Migrated from github.com) reviewed 2022-06-07 05:41:32 -05:00
@ -410,3 +413,31 @@ void irq_init_priorities() {
}
Wren6991 (Migrated from github.com) commented 2022-06-07 05:41:31 -05:00

This looks to be off by one.

If number of IRQs is 32, and first user IRQ is 31, there is 1 user IRQ, but this expression would give 0.

This looks to be off by one. If number of IRQs is 32, and first user IRQ is 31, there is 1 user IRQ, but this expression would give 0.
Wren6991 (Migrated from github.com) reviewed 2022-06-07 05:45:15 -05:00
Wren6991 (Migrated from github.com) left a comment

Happy with this, except for the potential off-by-one in the static assert (currently harmless) and @lurch's comments.

Happy with this, except for the potential off-by-one in the static assert (currently harmless) and @lurch's comments.
kilograham (Migrated from github.com) reviewed 2022-06-07 14:23:39 -05:00
@ -39,9 +39,9 @@
#define PICO_STDIO_USB_TASK_INTERVAL_US 1000
kilograham (Migrated from github.com) commented 2022-06-07 14:23:38 -05:00

I think i shall leave it for now, but i will change the description to make it less attractive

I think i shall leave it for now, but i will change the description to make it less attractive
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk!854
No description provided.