uintptr_t downcast(::System::_i_Object *obj,
const unsigned long *new_guid);
+ typedef uint64_t GUID[2];
+
+ // FIXME: use above typedef
static inline bool guids_equal(const unsigned long *guid1,
const unsigned long *guid2)
{
guid1[3] == guid2[3])));
}
- // Return the caller's PC. It'd be nice if GCC had a builtin for
- // the current PC, so that a simple relocation could be used rather
- // than a function call. OPT: put this in lowlevel-lib, so that
- // architectures can provide a faster version.
-
- unsigned long get_pc();
-
+ typedef uint32_t ID;
struct ParamInfoBlock {
- uintptr_t buffer_size;
- uintptr_t copy_size;
- uintptr_t *objlist;
- uintptr_t objlist_len;
- uintptr_t num_segments;
+ uint32_t buffer_size;
+ uint32_t copy_size;
+ ID *objlist;
+ uint32_t objlist_len;
+ uint32_t num_segments;
struct Segment {
- unsigned char *ptr;
+ uint8_t *ptr;
uintptr_t len;
uintptr_t flags;
uintptr_t reserved;
};
} segments[0];
};
- }
+
+ struct Segment0 {
+ enum {
+ InvokeMethod = 0,
+ GetIFaces = 1,
+ ReturnIFaces = 2,
+ };
+
+ union {
+ struct {
+ uint8_t opcode;
+ };
+
+ unsigned long pad;
+ };
+ };
+
+ struct InvokeMethod {
+ Segment0 seg0;
+ uint32_t iface;
+ uint32_t method;
+ uint8_t args[0];
+ };
+
+ union Message {
+ Segment0 seg0;
+ InvokeMethod invoke;
+ };
- namespace Priv {
- static inline bool in_kernel()
- {
+ namespace Priv {
+ // Return the caller's PC. It'd be nice if GCC had a builtin for
+ // the current PC, so that a simple relocation could be used rather
+ // than a function call. OPT: put this in lowlevel-lib, so that
+ // architectures can provide a faster version.
+
+ unsigned long get_pc();
+
+ static inline bool in_kernel()
+ {
#ifdef _KERNEL
- return true;
+ return true;
#else
- return false;
+ return false;
#endif
+ }
}
};
}
throw T(NULL, NULL, \
new(::System::RunTime::orbmm) \
::System::Exceptions::NativeCodeExceptionOriginInfo \
- (::System::RunTime::get_pc()), \
- ::System::Priv::in_kernel(), ##args); \
+ (::System::RunTime::Priv::get_pc()), \
+ ::System::RunTime::Priv::in_kernel(), ##args); \
} while (0)
#define rethrow_idl(oldex, T, args...) do { \
throw T(new(::System::RunTime::orbmm) typeof(oldex)(oldex), NULL, \
new(::System::RunTime::orbmm) \
::System::Exceptions::NativeCodeExceptionOriginInfo \
- (::System::RunTime::get_pc()), \
- ::System::Priv::in_kernel(), ##args); \
+ (::System::RunTime::Priv::get_pc()), \
+ ::System::RunTime::Priv::in_kernel(), ##args); \
} while (0)
#endif