On Fri, 2006-04-28 at 14:06 +0200, Bas Wijnen wrote:
> On Thu, Apr 27, 2006 at 04:06:35PM -0400, Jonathan S. Shapiro wrote:
> > Because of this, the operation that you want here is Discrim.
> >
> > HOWEVER!!!
> >
> > This case is so universal that there will be a safeGetType() method on
> > the discrim interface. Discrim.safeGetType() will perform:
> >
> > {
> > if (discrim.classify(theCap) == ctInvalid
> > return ctInvalid;
> > else
> > return theCap.getType();
> > }
> >
> > This is actually implemented at the library level, and I had forgotten
> > about it.
>
> So if the capability is invalid, it isn't invoked, but ctInvalid is returned
> instead. However, if it is valid, the capability is invoked in order to get
> the type, and a reply capability is thereby invalidated.
Yes, I see that the pseudo-code I gave above is incorrect. One only
wants to do the classify part for the cancellation protocol.
Also, one *never* wants to do gettype on a reply capability.
shap
_______________________________________________
L4-hurd mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/l4-hurd