mirror of
https://github.com/subhobhai943/SUB-OS.git
synced 2026-10-25 16:52:29 +00:00
24 lines
544 B
C
24 lines
544 B
C
#ifndef _BLOCK_ELEVATOR_H
|
|
#define _BLOCK_ELEVATOR_H
|
|
|
|
#include <block/block.h>
|
|
|
|
typedef enum {
|
|
ELEVATOR_NOOP = 0,
|
|
ELEVATOR_DEADLINE,
|
|
ELEVATOR_CFQ
|
|
} elevator_type_t;
|
|
|
|
typedef struct elevator {
|
|
elevator_type_t type;
|
|
const char* name;
|
|
void (*queue_request)(block_device_t* dev, block_request_t* req);
|
|
block_request_t* (*dispatch_request)(block_device_t* dev);
|
|
} elevator_t;
|
|
|
|
void elevator_init(void);
|
|
elevator_t* elevator_get_active(void);
|
|
void elevator_set_scheduler(elevator_type_t type);
|
|
|
|
#endif // _BLOCK_ELEVATOR_H
|