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:
Martin Åberg 2024-03-20 20:39:51 +01:00 committed by Anas Nashif
commit 884a4e5a35

View file

@ -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;