arch: sw_isr_table: Update shared interrupts structures
This commit updates the definition of z_shared_isr_table_entry to use _isr_table_entry instead of specially created z_shared_isr_client. Signed-off-by: Radosław Koppel <radoslaw.koppel@nordicsemi.no>
This commit is contained in:
parent
568cced14f
commit
b0c83f328c
|
@ -20,7 +20,7 @@ void z_shared_isr(const void *data)
|
|||
{
|
||||
size_t i;
|
||||
const struct z_shared_isr_table_entry *entry;
|
||||
const struct z_shared_isr_client *client;
|
||||
const struct _isr_table_entry *client;
|
||||
|
||||
entry = data;
|
||||
|
||||
|
@ -42,7 +42,7 @@ void z_isr_install(unsigned int irq, void (*routine)(const void *),
|
|||
{
|
||||
struct z_shared_isr_table_entry *shared_entry;
|
||||
struct _isr_table_entry *entry;
|
||||
struct z_shared_isr_client *client;
|
||||
struct _isr_table_entry *client;
|
||||
unsigned int table_idx;
|
||||
int i;
|
||||
k_spinlock_key_t key;
|
||||
|
@ -103,10 +103,10 @@ void z_isr_install(unsigned int irq, void (*routine)(const void *),
|
|||
k_spin_unlock(&lock, key);
|
||||
}
|
||||
|
||||
static void swap_client_data(struct z_shared_isr_client *a,
|
||||
struct z_shared_isr_client *b)
|
||||
static void swap_client_data(struct _isr_table_entry *a,
|
||||
struct _isr_table_entry *b)
|
||||
{
|
||||
struct z_shared_isr_client tmp;
|
||||
struct _isr_table_entry tmp;
|
||||
|
||||
tmp.arg = a->arg;
|
||||
tmp.isr = a->isr;
|
||||
|
@ -162,7 +162,7 @@ int z_isr_uninstall(unsigned int irq,
|
|||
{
|
||||
struct z_shared_isr_table_entry *shared_entry;
|
||||
struct _isr_table_entry *entry;
|
||||
struct z_shared_isr_client *client;
|
||||
struct _isr_table_entry *client;
|
||||
unsigned int table_idx;
|
||||
size_t i;
|
||||
k_spinlock_key_t key;
|
||||
|
|
|
@ -549,7 +549,7 @@ This is an array of struct z_shared_isr_table_entry:
|
|||
.. code-block:: c
|
||||
|
||||
struct z_shared_isr_table_entry {
|
||||
struct z_shared_isr_client clients[CONFIG_SHARED_IRQ_MAX_NUM_CLIENTS];
|
||||
struct _isr_table_entry clients[CONFIG_SHARED_IRQ_MAX_NUM_CLIENTS];
|
||||
size_t client_num;
|
||||
};
|
||||
|
||||
|
@ -558,15 +558,6 @@ lines. Whenever an interrupt line becomes shared, :c:func:`z_shared_isr` will
|
|||
replace the currently registered ISR in _sw_isr_table. This special ISR will
|
||||
iterate through the list of registered clients and invoke the ISRs.
|
||||
|
||||
The definition for struct z_shared_isr_client is as follows:
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
struct z_shared_isr_client {
|
||||
void (*isr)(const void *arg);
|
||||
const void *arg;
|
||||
};
|
||||
|
||||
x86 Details
|
||||
-----------
|
||||
|
||||
|
|
|
@ -69,13 +69,8 @@ struct _isr_list {
|
|||
};
|
||||
|
||||
#ifdef CONFIG_SHARED_INTERRUPTS
|
||||
struct z_shared_isr_client {
|
||||
void (*isr)(const void *arg);
|
||||
const void *arg;
|
||||
};
|
||||
|
||||
struct z_shared_isr_table_entry {
|
||||
struct z_shared_isr_client clients[CONFIG_SHARED_IRQ_MAX_NUM_CLIENTS];
|
||||
struct _isr_table_entry clients[CONFIG_SHARED_IRQ_MAX_NUM_CLIENTS];
|
||||
size_t client_num;
|
||||
};
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ static inline bool client_exists_at_index(void (*routine)(const void *arg),
|
|||
{
|
||||
size_t i;
|
||||
struct z_shared_isr_table_entry *shared_entry;
|
||||
struct z_shared_isr_client *client;
|
||||
struct _isr_table_entry *client;
|
||||
|
||||
shared_entry = &z_shared_sw_isr_table[irq];
|
||||
|
||||
|
|
Loading…
Reference in a new issue