Ignore:
Timestamp:
Feb 3, 2012, 1:53:24 PM (7 years ago)
Author:
gb
Message:

Use a cast in the code that sets up errno_loc in the TCR.
Revive jvm_init(), since Apple's JVM still/again clobbers Mach exception
ports.

Add kernel-import info for jvm-init for all architectures. (The kernel
import table isn't architecture-specific, though some entries effectively
are.)

Tweak jni.lisp a bit; still needs lots of work.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/pmcl-kernel.c

    r15187 r15191  
    23052305}
    23062306
    2307 
     2307/* A horrible hack to allow us to initialize a JVM instance from lisp.
     2308   On Darwin, creating a JVM instance clobbers the thread's existing
     2309   Mach exception infrastructure, so we save and restore it here.
     2310*/
     2311
     2312typedef int (*jvm_initfunc)(void*,void*,void*);
     2313
     2314int
     2315jvm_init(jvm_initfunc f,void*arg0,void*arg1,void*arg2)
     2316{
     2317  int result = -1;
     2318  TCR *tcr = get_tcr(1);
     2319#ifdef DARWIN
     2320  extern kern_return_t tcr_establish_lisp_exception_port(TCR *);
     2321#endif
     2322 
     2323  result = f(arg0,arg1,arg2);
     2324#ifdef DARWIN
     2325  tcr_establish_lisp_exception_port(tcr);
     2326#endif
     2327  return result;
     2328}
    23082329
    23092330
Note: See TracChangeset for help on using the changeset viewer.