Re: MiG Subsystem
Re: MiG Subsystem
- Subject: Re: MiG Subsystem
- From: David Blanton <email@hidden>
- Date: Mon, 10 Feb 2003 12:37:41 -0700
On 2/10/03 1:49 AM, "Quinn" <email@hidden> wrote:
>
At 9:00 -0700 7/2/03, David Blanton wrote:
>
> In the entry:
>
>
>
> subsystem random 500;
>
>
>
> In a .def file for MIGGING what is the 500 parameter?
>
>
>
> And, is there a generic subsystem?
>
>
[I'm sure Jim will correct me if I'm wrong, but here goes...] MIG
>
generates code to pack the function parameters you supply into a
>
parameter block and send that parameter block in a message to the
>
destination port. On the server side, the MIG code takes that
>
parameter block, unpacks it, and calls the relevant function. The
>
MIG server decides which message is which by examining a message type
>
selector. These message type values are determined by the subsystem
>
value. So, if you have a .defs file that looks like this:
>
>
-------------------------------------------------------------
>
subsystem MySubsystem 10000;
>
>
routine MyRoutine1(...);
>
>
routine MyRoutine2(...);
>
>
routine MyRouinee3(...);
>
-------------------------------------------------------------
>
>
then the MyRoutine1 is assigned 10000 as its selector, MyRoutine2
>
uses 10001, MyRouinee3 uses 10002, and so on.
>
>
The actual values that you use are irrelevant except that:
>
>
o if you have multiple services listening on the same Mach port, each
>
service must have a distinct range, and
>
>
o if you want to maintain release-to-release binary compatibility,
>
you have to make sure that the numbers are stable.
>
>
>> What is the meaning/use of MySubsystem in subsystem
>
>> MySubsystem above. It is implied that servers are associated with
>
>> a particular subsystem and that to define ones own subsystem is a
>
>> non-trivial task. Can someone shed some light on subsystems.
Thanks.
Peace.
DB
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.