Hi,

On Tue, Jul 07, 2009 at 01:21:09PM +0800, Da Zheng wrote:
> olafbuddenha...@gmx.net wrote:

>> Well, AIUI, there are only two ways how a receive right could be used:
>> either mach_port_insert_right() (or mach_port_extract_right()) is
>> invoked, in which case we can look at the parameters, so we know exactly
>> where it is.
>>
>> The other option is that it's sent to another task via an RPC. In this
>> case indeed we don't know what name it ends up as, so I guess we
>> actually have to search for it -- but at least we know in which task.
>>
>> Unless I'm missing something essential, there is never any need to
>> search through all the tasks...
>>   
> We can look at the parameters of mach_port_extract_right() to find the  
> port name of the receive right, but it doesn't always work for  
> mach_port_insert_right().
> The parameter name of mach_port_insert_right() is the port name where we  
> are going to insert the port right and isn't necessary to be the port  
> name of the receive right (though in many cases they are).
> But you are right, we can always know which task has the receive right.
> I decide not to treat mach_port_insert_right() or  
> mach_port_extract_right() specially, but search for the receive right in  
> a specific task.

I didn't really understand the bit about mach_port_insert_right()... But
as we probably can't avoid the search in the RPC case anyways, I'm fine
with doing it like this :-)

-antrik-


Reply via email to