]> git.buserror.net Git - polintos/scott/priv.git/blobdiff - kernel/include/kern/orb.h
Remove redundant type declarations.
[polintos/scott/priv.git] / kernel / include / kern / orb.h
index b00d758fbcf1c671e4a297d933a0136d5e7e28f8..52d611d86139496b1eb2d7530eb1eb5821523b6b 100644 (file)
@@ -7,6 +7,9 @@
 
 #include <util/list.h>
 #include <util/rbtree.h>
+#include <util/radix.h>
+#include <util/bmaptree.h>
+
 #include <System/Objects.h>
 
 namespace Mem {
@@ -51,12 +54,6 @@ namespace ORB {
                
                CallFrame frames[0];
        };
-       
-       struct ObjectHdr;
-       struct Object;
-       
-       typedef u32 ID;
-       typedef Util::RadixTree<ObjectHdr, ID> IDRMap;
 
        struct ObjectHdr {
                ID id;
@@ -78,15 +75,31 @@ namespace ORB {
        struct ObjectPtr : public ObjectHdr {
                Object *object;
        };
+       
+       union ObjTableEntry {
+               ObjectHdr hdr;
+               Object obj;
+               ObjectPtr ptr;
+       };
+
+       typedef Util::RadixTree<ObjTableEntry, ID, 6> IDTable;
+       typedef Util::RadixTree<ObjectHdr *, ID, 4> IDRMap;
+       typedef Util::BitmapTree<ID> IDAlloc;
 
        class IDSpace {
                // Reverse mapping of object pointers to local IDs
-               IDRMap id_rmap;
+               IDTable table;
+               IDRMap rmap;
+               IDAlloc alloc;
        
        public:
                Object *lookup(u32 id);
-               u32 rlookup(Object *obj);
+               ObjectHdr *get_local_hdr(Object *obj);
+               Object *newobj(Mem::ProcAddrSpace *aspace, uintptr_t entry);
        };
+       
+       void invoke_method(System::RunTime::ParamInfoBlock *pib, uintptr_t &stack);
+       uintptr_t return_from_method(uintptr_t &exptr, size_t &exlen);
 }
 
 #endif