]> git.buserror.net Git - polintos/scott/priv.git/blobdiff - kernel/include/kern/orb.h
Random stuff.
[polintos/scott/priv.git] / kernel / include / kern / orb.h
index f9654341589af29f27fb95ff5de3c62b54e2af76..22664ec2d006dac80c92d67ce6dae7a24939c4e5 100644 (file)
@@ -49,17 +49,9 @@ namespace ORB {
                CallFrame frames[0];
        };
 
+       static const ID invalid_id = 0xffffffff;
        struct ObjectHdr {
                ID id;
-
-               union {
-                       struct {
-                               u32 Valid:1;
-                               u32 Pointer:1;
-                       };
-                       
-                       u32 flags;
-               };
        };
        
        struct Object : public ObjectHdr {
@@ -70,19 +62,15 @@ namespace ORB {
                Object *object;
        };
        
-       union ObjTableEntry {
-               ObjectHdr hdr;
-               Object obj;
-               ObjectPtr ptr;
-       };
-
-       typedef Util::RadixTree<ObjTableEntry, ID, 6> IDTable;
+       typedef Util::RadixTree<Object, ID, 6> LocalIDTable;
+       typedef Util::RadixTree<ObjectPtr, ID, 6> RemoteIDTable;
        typedef Util::RBPtr<Object *, ObjectPtr *> IDRMap;
        typedef Util::BitmapTree<ID> IDAlloc;
 
        class IDSpace {
                Lock::SpinLock lock; // For add/del only; not needed for lookup
-               IDTable table; // Forward mapping of local IDs to object ptrs
+               LocalIDTable locals; // Objects that live in this address space
+               RemoteIDTable remotes; // Objects that live in other address spaces
                IDRMap rmap; // Reverse mapping of remote object pointers to local IDs
                IDAlloc alloc; // Bitmap for allocating IDs