Changeset 11356


Ignore:
Timestamp:
Nov 12, 2008, 10:31:27 PM (11 years ago)
Author:
gb
Message:

Horrible hack to initialize JVMs (which is awkward on Darwin). Needs
more infrastructure, just want to see if it compiles on Darwin ...

File:
1 edited

Legend:

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

    r11241 r11356  
    19511951}
    19521952
     1953/* A horrible hack to allow us to initialize a JVM instance from lisp.
     1954   On Darwin, creating a JVM instance clobbers the thread's existing
     1955   Mach exception infrastructure, so we save and restore it here.
     1956*/
     1957
     1958typedef int (*jvm_initfunc)(void*,void*,void*);
     1959
     1960int
     1961jvm_init(jvm_initfunc f,void*arg0,void*arg1,void*arg2)
     1962{
     1963  int result = -1;
     1964  TCR *tcr = get_tcr(1);
     1965#ifdef DARWIN
     1966  extern kern_return_t tcr_establish_lisp_exception_port(TCR *);
     1967#endif
     1968 
     1969  result = f(arg0,arg1,arg2);
     1970#ifdef DARWIN
     1971  tcr_establish_lisp_exception_port(tcr);
     1972#endif
     1973  return result;
     1974}
     1975 
    19531976
    19541977
Note: See TracChangeset for help on using the changeset viewer.