mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-06-16 02:15:47 +00:00
interrupt: Add interrupt_table__set helper
In case if some particular interrupt entry needs to be modified we should use interrupt_table__set helper. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
committed by
Will Deacon
parent
99d4754573
commit
d1a26cf05d
@@ -26,5 +26,6 @@ struct interrupt_table {
|
||||
|
||||
void interrupt_table__copy(struct interrupt_table *self, void *dst, unsigned int size);
|
||||
void interrupt_table__setup(struct interrupt_table *self, struct real_intr_desc *entry);
|
||||
void interrupt_table__set(struct interrupt_table *self, struct real_intr_desc *entry, unsigned int num);
|
||||
|
||||
#endif /* KVM__INTERRUPT_H */
|
||||
|
||||
@@ -19,3 +19,9 @@ void interrupt_table__setup(struct interrupt_table *self, struct real_intr_desc
|
||||
for (i = 0; i < REAL_INTR_VECTORS; i++)
|
||||
self->entries[i] = *entry;
|
||||
}
|
||||
|
||||
void interrupt_table__set(struct interrupt_table *self, struct real_intr_desc *entry, unsigned int num)
|
||||
{
|
||||
if (num < REAL_INTR_VECTORS)
|
||||
self->entries[num] = *entry;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user