-
Notifications
You must be signed in to change notification settings - Fork 15
Redesigning KObject #15
Comments
Probably a copy/paste error but want to make sure it's understood that transfer memory != shared memory. Also, |
Yup, totally a copy pasta error. And I'm still super unclear on how an object domain works, so thanks for the correction :). Do you have any IPC off the top of your head that return objects as domains instead of sessions ? |
Currently working on this issue, as it is going to be required for my Rust code generator in Megaton Hammer (want to make it as safe as possible). @hthh In generated_diff (the raw one, not the SDK one), you have "inhandles" and "outhandles", an array of either Am I right that 1 means move handle and 2 means copy handle ? If that's the case, it means I have almost everything I need in there. |
I'm doing some more work on SwIPC for KFS. Here's the full list of handles we need to have AFAIK:
|
Right now, both copy and move handles have the same "KObject" type in the SwIPC definitions. This type is extremely vague: not only does it not specify the kind of handle it represents, it isn't enough information to know if it's a move or a copy handle.
Right now, SwIPC uses
object
for two different things (that share the same IPC message). It represents a moved handle that can either be casted to a kind of kernel handle (NPort
,IPipe
) or to a service (which is a special-case ofIPipe
). While it's certainly not wrong at the IPC marshalling level, it makes it hard on the IPC codegen to differentiate the two (we don't necessarily want to return the same types depending of the kind of handle returned).As such, I'm interested in changing
KObject
a little. I'm thinking of renamingKObject
toKHandle
to be closer to the kernel terminology, and give it two template arguments:KHandle<copy>
is a copy handle,KHandle<move>
is a move handleKHandle<_, process>
is a process handle. You may pass 0xffff8001KHandle<_, thread>
is a thread handle. You may pass 0xffff8000KHandle<_, transfer_memory>
is a transfer memory handle.KHandle<_, shared_memory>
is a shared memory handle.KHandle<_, port>
is a port handleKHandle<_, session>
is a session handleKHandle<_, event>
is an event handle ?An
object
is the same as aKHandle<move, session>
as far as the IPC marshalling is concerned, but is additionally given an interface type that the returned session conforms to.The text was updated successfully, but these errors were encountered: