[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: IDL issue - struct return vs. cap return
From: |
Jonathan S. Shapiro |
Subject: |
Re: IDL issue - struct return vs. cap return |
Date: |
Mon, 09 Jul 2007 20:42:27 -0400 |
On Mon, 2007-07-09 at 23:24 +0200, Neal H. Walfield wrote:
> > Because cap_t is a reference, you basically have two options if you want
> > to return a cap_t from an IDL procedure:
> >
> > 1. Use a well-known return location, e.g. capability register 2.
> > 2. Call the capability location allocator from inside the stub, as
> > in:
> >
> > f() {
> > cap_t _retVal = alloc_cap_location();
> > DO_SYSCALL_HERE(_retVal);
> > return _retVal;
> > }
>
> 3. The caller provides the address of the slot in which the function
> should store the capability. (You want this for the same reasons
> you may not necessarily want a function to call malloc.)
This is exactly what happens when the return value is rotated to be an
OUT parameter.
What you seem to be advocating is that the location be passed in and
then be passed back out. What advantage is there to this?
shap
--
Jonathan S. Shapiro, Ph.D.
Managing Director
The EROS Group, LLC
- Re: returning errors, (continued)
- Re: IDL issue, Neal H. Walfield, 2007/07/09
- Re: IDL issue, Jonathan S. Shapiro, 2007/07/09
- Re: IDL issue - struct return vs. cap return, Jonathan S. Shapiro, 2007/07/09
- Re: IDL issue - struct return vs. cap return, Neal H. Walfield, 2007/07/09
- Re: IDL issue - struct return vs. cap return, Pierre THIERRY, 2007/07/09
- Re: IDL issue - struct return vs. cap return, Jonathan S. Shapiro, 2007/07/09
- Re: IDL issue - struct return vs. cap return, Neal H. Walfield, 2007/07/10
- Re: IDL issue - struct return vs. cap return, Jonathan S. Shapiro, 2007/07/10
- Re: IDL issue - struct return vs. cap return,
Jonathan S. Shapiro <=
- Re: IDL issue - struct return vs. cap return, Jonathan S. Shapiro, 2007/07/10
- Re: IDL issue - struct return vs. cap return, Neal H. Walfield, 2007/07/10
- Re: IDL issue - struct return vs. cap return, Jonathan S. Shapiro, 2007/07/10
- Re: IDL issue - struct return vs. cap return, Neal H. Walfield, 2007/07/10
- Re: IDL issue - struct return vs. cap return, Jonathan S. Shapiro, 2007/07/10
- Re: IDL issue - struct return vs. cap return, Jonathan S. Shapiro, 2007/07/10
- Re: IDL issue - struct return vs. cap return, Neal H. Walfield, 2007/07/11
- Re: IDL issue - struct return vs. cap return, Jonathan S. Shapiro, 2007/07/11
- Re: IDL issue - struct return vs. cap return, Marcus Brinkmann, 2007/07/11
- Re: IDL issue - struct return vs. cap return, Pierre THIERRY, 2007/07/11