irq: Add irq_tasks, move NVMe to it
This commit is contained in:
@@ -5,9 +5,7 @@
|
||||
#include <zinnia/compiler.h>
|
||||
#include <zinnia/errno.h>
|
||||
#include <zinnia/list.h>
|
||||
#include <zinnia/spin.h>
|
||||
#include <zinnia/types.h>
|
||||
#include <zinnia/workqueue.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -33,6 +31,7 @@ enum irq_mode : uint8_t {
|
||||
};
|
||||
|
||||
struct irq_line;
|
||||
struct irq_task;
|
||||
|
||||
struct irq_handler {
|
||||
enum irq_status (*raise)(struct irq_handler* self);
|
||||
@@ -40,9 +39,7 @@ struct irq_handler {
|
||||
list_link(struct irq_handler*) next;
|
||||
|
||||
struct irq_line* line;
|
||||
struct workqueue* wq;
|
||||
struct work work;
|
||||
bool holds_mask;
|
||||
_Atomic(bool) need;
|
||||
};
|
||||
|
||||
struct irq_line {
|
||||
@@ -55,8 +52,7 @@ struct irq_line {
|
||||
list_head(struct irq_handler*) handlers;
|
||||
enum irq_mode mode;
|
||||
enum irq_trigger_mode trigger;
|
||||
struct spinlock thread_lock;
|
||||
size_t threads_pending;
|
||||
struct irq_task* task;
|
||||
};
|
||||
|
||||
struct msi_line {
|
||||
@@ -76,7 +72,7 @@ void irq_line_program(struct irq_line* line, enum irq_trigger_mode trigger, enum
|
||||
void irq_line_raise(struct irq_line* line);
|
||||
void irq_line_attach(struct irq_line* line, struct irq_handler* handler);
|
||||
void irq_line_detach(struct irq_line* line, struct irq_handler* handler);
|
||||
errno_t irq_line_attach_threaded(struct irq_line* line, struct irq_handler* handler, const char* name);
|
||||
errno_t irq_line_attach_task(struct irq_line* line, struct irq_handler* handler, const char* name);
|
||||
|
||||
void irq_lock();
|
||||
void irq_unlock();
|
||||
|
||||
@@ -102,6 +102,7 @@ struct scheduler {
|
||||
|
||||
struct timer preempt_timer;
|
||||
bool need_resched;
|
||||
bool owe_preempt;
|
||||
uint64_t slice_start;
|
||||
uint64_t boost_epoch;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user