implemented: - Pages can be shared between maps. - A change made to a map is written to the file, at munmap(). not yet implemented: - VM operation during page IO execution. Because page IO is executed with VM's lock. - Page IO, which does not change a file size with any case. When munmap() races with truncate(), the file size may be changed illegally.
29 lines
542 B
C
29 lines
542 B
C
#ifndef HEADER_PAGER_H
|
|
#define HEADER_PAGER_H
|
|
|
|
#include <ihk/types.h>
|
|
|
|
enum pager_op {
|
|
PAGER_REQ_CREATE = 0x0001,
|
|
PAGER_REQ_RELEASE = 0x0002,
|
|
PAGER_REQ_READ = 0x0003,
|
|
PAGER_REQ_WRITE = 0x0004,
|
|
};
|
|
|
|
/*
|
|
* int pager_req_create(int fd, int flags, int prot, uintptr_t result_rpa);
|
|
*/
|
|
struct pager_create_result {
|
|
uintptr_t handle;
|
|
int maxprot;
|
|
int8_t padding[4];
|
|
};
|
|
|
|
/*
|
|
* int pager_req_release(uintptr_t handle);
|
|
*/
|
|
/*
|
|
* int pager_req_read(uintptr_t handle, off_t off, size_t size, uintptr_t buf_rpa);
|
|
*/
|
|
#endif /* HEADER_PAGER_H */
|