arch: Fix assert logic for installing shared interrupt
With this commit, it is now allowed to register any ISR and arg combination for the same IRQ, except the case when the exact same ISR-arg combination is already registered. The previous assert logic had a restriction where the same ISR could not be registered multiple times with different arguments. Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
This commit is contained in:
parent
c9da274eb2
commit
884a4e5a35
1 changed files with 2 additions and 2 deletions
|
@ -92,8 +92,8 @@ void z_isr_install(unsigned int irq, void (*routine)(const void *),
|
||||||
for (i = 0; i < shared_entry->client_num; i++) {
|
for (i = 0; i < shared_entry->client_num; i++) {
|
||||||
client = &shared_entry->clients[i];
|
client = &shared_entry->clients[i];
|
||||||
|
|
||||||
__ASSERT(client->isr != routine && client->arg != param,
|
__ASSERT((client->isr == routine && client->arg == param) == false,
|
||||||
"trying to register duplicate ISR/arg pair");
|
"ISR/arg combination is already registered");
|
||||||
}
|
}
|
||||||
|
|
||||||
shared_entry->clients[shared_entry->client_num].isr = routine;
|
shared_entry->clients[shared_entry->client_num].isr = routine;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue