| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
inlined port rights.
For i686, we just change the code to use mach_port_name_inlined_t when
defining the types. This is a no-op.
For x86_64, there's a few things that are different:
- In the server code, the server handler can get inlined ports and the
array will be resized and cast as an array of mach_port_name_t. Output
parameters have a similar treatment where the inlined array in the
output is used as an array of mach_port_name_t but resized to look like
a mach_port_name_inlined_t.
- In the user side, we follow the same approach. Input ports as arrays
of mach_port_name_t are expanded into an array of mach_port_name_inlined_t.
Output ports are then converted back into an array of
mach_port_name_inlined_t so that they fit into the expected message
format.
Essentially, regardless of whether port rights are inline or out of
line, user interfaces and server stubs always receive an array of port
rights, not mach_port_name_inlined_t. However, inlined port rights will
be exchanged using mach_port_name_inlined_t.
|
|
|
|
|
|
| |
for inlined port rights."
This reverts commit c40604042bd6e9f80e4f5fe6bc9deefb29c4b94a.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
inlined port rights.
For i686, we just change the code to use mach_port_name_inlined_t when
defining the types. This is a no-op.
For x86_64, there's a few things that are different:
- In the server code, the server handler can get inlined ports and the
array will be resized and cast as an array of mach_port_name_t. Output
parameters have a similar treatment where the inlined array in the
output is used as an array of mach_port_name_t but resized to look like
a mach_port_name_inlined_t.
- In the user side, we follow the same approach. Input ports as arrays
of mach_port_name_t are expanded into an array of mach_port_name_inlined_t.
Output ports are then converted back into an array of
mach_port_name_inlined_t so that they fit into the expected message
format.
Essentially, regardless of whether port rights are inline or out of
line, user interfaces and server stubs always receive an array of port
rights, not mach_port_name_inlined_t. However, inlined port rights will
be exchanged using mach_port_name_inlined_t.
Message-ID: <20231124213041.952886-4-flaviocruz@gmail.com>
|
|
|
|
| |
Message-Id: <Y3/Z1CGL8D4OwT66@viriathus>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Basic syntax is presented below and allows users to define
nested structured types by using simpler or structure types as
members. Mig will use the C padding and alignment rules to produce
the same size as the corresponding C structures.
type timespec_t = struct {
uint32_t tv_sec;
uint32_t tv_nsec;
};
This allows us to build stubs that are more easily adaptable to other
architectures.
Message-Id: <Y2SjQSMOINY8I5Dy@viriathus>
|
|
|
|
|
|
| |
* server.c: Add cast for ipc_port_t arguments that are handled differently.
* type.c: Set itKernelPort when the mach_port_t is treated as a ipc_port_t.
* type.h: Add itKernelPort to struct ipc_type.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for protected payloads. The new `intranpayload' option can
be used to specify a translation function translating payloads to
values of the translated type. This function will be used instead of
the `intran' function to to look up the receiving object of a message
in a server.
This makes it easy to use the protected payloads introduced in GNU
Mach 1.5.
An inTransPayload function translates payloads to objects, like an
inTrans function translates from port names to objects. Generate code
in the server routine to optimize lookups to the receiver of the
message.
Additionally, if no intran function is provided, but an intranpayload
function is, it is expected to translate from payloads to port names.
This is used to preserve the semantics in case the server routine
expects a port name.
* NEWS: Add item.
* lexxer.l: Emit syInTranPayload.
* parser.h: Define syInTranPayload.
* parser.y (TransTypeSpec): Handle syInTranPayload.
* type.h (struct ipc_type): Add itInTransPayload.
* server.c (WriteExtractArgValue): If a payload-aware intrans function
has been specified, use it to get a reference to the receiving object.
* routine.c (rtAugmentArgKind): Force the use of a local variable if a
payload-aware translate-in function is defined.
|
|
|