read isn't written yet, but I think all the building blocks I need for it are.
Compiles and runs; does nothing yet.
This commit is contained in:
parent
364d7d2c7b
commit
1196b3eb1d
21 changed files with 84 additions and 3347 deletions
|
|
@ -41,8 +41,13 @@ struct pso2 *pointer_to_object( struct pso_pointer pointer ) {
|
|||
struct pso2 *result = NULL;
|
||||
|
||||
if ( pointer.node == node_index ) {
|
||||
union page *pg = pages[pointer.page];
|
||||
result = ( struct pso2 * ) &pg->words[pointer.offset];
|
||||
if (pointer.page < get_pages_allocated() && pointer.offset < (PAGE_BYTES / 8)) {
|
||||
// TODO: that's not really a safe test of whether this is a valid pointer.
|
||||
union page *pg = pages[pointer.page];
|
||||
result = ( struct pso2 * ) &pg->words[pointer.offset];
|
||||
} else {
|
||||
// TODO: throw bad pointer exception.
|
||||
}
|
||||
}
|
||||
// TODO: else if we have a copy of the object in cache, return that;
|
||||
// else request a copy of the object from the node which curates it.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue