My Project
|
Data Structures | |
struct | Block |
class | FastLock |
struct | MetaPage |
class | Mutex |
struct | ProcessChannel |
struct | ProcessInfo |
struct | refcount_t |
struct | VMem |
struct | VSeg |
Typedefs | |
typedef size_t | segaddr_t |
typedef size_t | vaddr_t |
typedef int | ipc_signal_t |
Enumerations | |
enum | SignalState { Waiting = 0 , Pending = 1 , Accepted = 2 } |
Functions | |
static void | lock_allocator () |
static void | unlock_allocator () |
static void | print_freelists () |
void | vmem_free (vaddr_t vaddr) |
vaddr_t | vmem_alloc (size_t size) |
void | init_flock_struct (struct flock &lock_info, size_t offset, size_t len, bool lock) |
void | lock_file (int fd, size_t offset, size_t len) |
void | unlock_file (int fd, size_t offset, size_t len) |
void | lock_metapage () |
void | unlock_metapage () |
void | init_metapage (bool create) |
static void | lock_process (int processno) |
static void | unlock_process (int processno) |
static ProcessInfo & | process_info (int processno) |
bool | send_signal (int processno, ipc_signal_t sig, bool lock) |
ipc_signal_t | check_signal (bool resume, bool lock) |
void | accept_signals () |
ipc_signal_t | wait_signal (bool lock) |
void | drop_pending_signals () |
Block * | block_ptr (vaddr_t vaddr) |
static int | find_level (size_t size) |
static segaddr_t | find_buddy (segaddr_t addr, int level) |
static vaddr_t | allocated_ptr_to_vaddr (void *ptr) |
Variables | |
size_t | config [4] = { METABLOCK_SIZE, MAX_PROCESS, SEGMENT_SIZE, MAX_SEGMENTS } |
const segaddr_t | SEGADDR_NULL = ~(segaddr_t) 0 |
const vaddr_t | VADDR_NULL = ~(segaddr_t) 0 |
static const int | MAX_PROCESS = 64 |
static const size_t | METABLOCK_SIZE = 128 * 1024 |
static const int | LOG2_SEGMENT_SIZE = 28 |
static const int | LOG2_MAX_SEGMENTS = 10 |
static const size_t | MAX_SEGMENTS = 1 << LOG2_MAX_SEGMENTS |
static const size_t | SEGMENT_SIZE = 1 << LOG2_SEGMENT_SIZE |
static const size_t | SEGMENT_MASK = (SEGMENT_SIZE - 1) |
static VMem & | vmem = VMem::vmem_global |
struct vspace::internals::MetaPage |
Data Fields | ||
---|---|---|
FastLock | allocator_lock | |
size_t | config_header[4] | |
vaddr_t | freelist[LOG2_SEGMENT_SIZE+1] | |
ProcessInfo | process_info[MAX_PROCESS] | |
int | segment_count |
struct vspace::internals::ProcessChannel |
struct vspace::internals::ProcessInfo |
Data Fields | ||
---|---|---|
pid_t | pid | |
ipc_signal_t | signal | |
SignalState | sigstate |
typedef int vspace::internals::ipc_signal_t |
typedef size_t vspace::internals::segaddr_t |
typedef size_t vspace::internals::vaddr_t |
void vspace::internals::accept_signals | ( | ) |
Definition at line 981 of file vspace.cc.
|
inlinestatic |
ipc_signal_t vspace::internals::check_signal | ( | bool | resume, |
bool | lock | ||
) |
Definition at line 944 of file vspace.cc.
void vspace::internals::drop_pending_signals | ( | ) |
|
inlinestatic |
void vspace::internals::init_flock_struct | ( | struct flock & | lock_info, |
size_t | offset, | ||
size_t | len, | ||
bool | lock | ||
) |
void vspace::internals::init_metapage | ( | bool | create | ) |
Definition at line 887 of file vspace.cc.
|
static |
void vspace::internals::lock_file | ( | int | fd, |
size_t | offset, | ||
size_t | len | ||
) |
Definition at line 867 of file vspace.cc.
void vspace::internals::lock_metapage | ( | ) |
Definition at line 879 of file vspace.cc.
|
static |
|
static |
Definition at line 728 of file vspace.cc.
|
static |
bool vspace::internals::send_signal | ( | int | processno, |
ipc_signal_t | sig, | ||
bool | lock | ||
) |
Definition at line 921 of file vspace.cc.
|
static |
void vspace::internals::unlock_file | ( | int | fd, |
size_t | offset, | ||
size_t | len | ||
) |
void vspace::internals::unlock_metapage | ( | ) |
Definition at line 883 of file vspace.cc.
|
static |
vaddr_t vspace::internals::vmem_alloc | ( | size_t | size | ) |
Definition at line 808 of file vspace.cc.
void vspace::internals::vmem_free | ( | vaddr_t | vaddr | ) |
Definition at line 756 of file vspace.cc.
ipc_signal_t vspace::internals::wait_signal | ( | bool | lock | ) |
size_t vspace::internals::config = { METABLOCK_SIZE, MAX_PROCESS, SEGMENT_SIZE, MAX_SEGMENTS } |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |