identifying a raise_closure from C

Simon Marlow simonmar@microsoft.com
Mon, 24 Feb 2003 13:03:43 -0000


> In C, I have an StgClosure pointer, pointing to a THUNK.
>=20
> I would like to know whether this particular THUNK is a raise_closure,
> (as built by raisezh_fast() in rts/Exception.hc).
>=20
> Is there any identifying information I can use to tell=20
> definitely whether
> this THUNK is a raise_closure? Perhaps the stg_raise_info info table
> has enough information?

Since raise closures don't have their own closure types, the only way is
to compare the closure's info pointer against stg_raise_info.  This is
fine, and we use the same technique in several other places in the RTS.

Cheers,
	Simon