[kaffe] 'ABORT' or 'abort'?

Dalibor Topic robilad at kaffe.org
Thu Sep 2 10:02:19 PDT 2004


Kiyo Inaba wrote:
> Hi,
> 
> I've been back from Europe, Japan is still too hot.
> 
> I start to merge config/m68k/{jit,jit3}-m68k.def for easier maintenance,
> and I noticed jit3-m68k.def uses macro 'abort' rather than 'ABORT'.
> It also happens for several other jit def files. According to the
> ChangeLog.1 (by Godmar), 'ABORT' should be better in this context.
> 
> Are there anyone who knows more than what I understand right now?
> 
> If these two calls are used according to the timing (I mean before
> JNI initialization or not), automagical change should be harmful,
> but I guess this is just for mistake.

Hi Kiyo,

I had to google around a bit to find a good answer, so sorry for the 
delay :)

JNI includes an Invocation API since JNI 1.2 [1]. That API allows 
someone who creates a JVM to pass extra options to the VM to insert exit 
and abort hooks to call user supplied code on those events. ABORT() and 
EXIT() are simply shorthand macros that invoke the respective hooks. The 
hooks by default point to abort and exit functions from standard C library.

So one should always use ABORT rather than abort(), as far as I can 
tell. the same goes for EXIT() rather than exit(), I think.

cheers,
dalibor topic

[1] http://java.sun.com/j2se/1.4.2/docs/guide/jni/jni-12.html#invo




More information about the kaffe mailing list