[base] Introduce io_generator

This commit is contained in:
Ming-Hung Tsai
2020-06-12 18:33:49 +08:00
parent e724a72045
commit 12d7178199
5 changed files with 336 additions and 0 deletions

25
base/io.h Normal file
View File

@@ -0,0 +1,25 @@
#ifndef BASE_IO_H
#define BASE_IO_H
#include "base/types.h"
#include <stdint.h>
//----------------------------------------------------------------
namespace base {
enum req_op {
REQ_OP_READ,
REQ_OP_WRITE,
REQ_OP_DISCARD
};
struct io {
unsigned op_;
sector_t sector_;
sector_t size_;
};
}
//----------------------------------------------------------------
#endif