My monster, it not only compiles, it now runs!
This commit is contained in:
parent
60921be3d4
commit
a8b4a6e69d
26 changed files with 244 additions and 172 deletions
|
|
@ -22,8 +22,9 @@
|
|||
* @param offset The offset, in words, within that page, of the object.
|
||||
* @return struct pso_pointer a pointer referencing the specified object.
|
||||
*/
|
||||
struct pso_pointer make_pointer( uint32_t node, uint16_t page, uint16_t offset) {
|
||||
return (struct pso_pointer){ node, page, offset};
|
||||
struct pso_pointer make_pointer( uint32_t node, uint16_t page,
|
||||
uint16_t offset ) {
|
||||
return ( struct pso_pointer ) { node, page, offset };
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -36,16 +37,15 @@ struct pso_pointer make_pointer( uint32_t node, uint16_t page, uint16_t offset)
|
|||
* @param pointer a pso_pointer which references an object.
|
||||
* @return struct pso2* the actual address in memory of that object.
|
||||
*/
|
||||
struct pso2* pointer_to_object( struct pso_pointer pointer) {
|
||||
struct pso2* result = NULL;
|
||||
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.node == node_index ) {
|
||||
union page *pg = pages[pointer.page];
|
||||
result = ( struct pso2 * ) &pg->words[pointer.offset];
|
||||
}
|
||||
// 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.
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue