Skip to content

Commit

Permalink
arch: Fix assert logic for installing shared interrupt
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
tbr-tt authored and nashif committed Sep 11, 2024
1 parent c9da274 commit 884a4e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/common/shared_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ void z_isr_install(unsigned int irq, void (*routine)(const void *),
for (i = 0; i < shared_entry->client_num; i++) {
client = &shared_entry->clients[i];

__ASSERT(client->isr != routine && client->arg != param,
"trying to register duplicate ISR/arg pair");
__ASSERT((client->isr == routine && client->arg == param) == false,
"ISR/arg combination is already registered");
}

shared_entry->clients[shared_entry->client_num].isr = routine;
Expand Down

0 comments on commit 884a4e5

Please sign in to comment.