/* DO NOT EDIT THIS FILE - it is machine generated (JCGO_116) */

#ifdef JCGO_SEPARATED
#define JCGO_116
#include "jcgortl.h"
#include "Main.h"
#endif

#ifdef JCGO_116

#ifdef CHKALL_java_lang_Runtime
#include "jcgobchk.h"
#endif

JCGO_NOSEP_INLINE void CFASTCALL
java_lang_Runtime__void( java_lang_Runtime This )
{
 JCGO_FIELD_NZACCESS(This, lock)= java_lang_Object__new__();
}

JCGO_NOSEP_STATIC java_lang_Runtime CFASTCALL
java_lang_Runtime__this__( java_lang_Runtime This )
{
 {
  ;
  java_lang_Runtime__void(This);
 }
 return This;
}

JCGO_NOSEP_FRWINL java_lang_Runtime CFASTCALL
java_lang_Runtime__new__( void )
{
 return java_lang_Runtime__this__(
  (java_lang_Runtime)jcgo_newObject((jvtable)&java_lang_Runtime_methods));
}

JCGO_NOSEP_FRWINL java_lang_Runtime CFASTCALL
java_lang_Runtime__getRuntime__( void )
{
 JCGO_CLINIT_TRIG(java_lang_Runtime__class);
 {
  return java_lang_Runtime__current;
 }
}

JCGO_NOSEP_FRWINL void CFASTCALL
java_lang_Runtime__exit__I( java_lang_Runtime This, jint status )
{
 {
  java_lang_SecurityManager sm;
  sm= java_lang_SecurityManager__current;
  if (sm != jnull)
  {
   (java_lang_SecurityManager__checkExit__I(
    sm, status));
  }
  if ((java_lang_Runtime__runShutdownHooks__(
   This)))
  {
   (java_lang_Runtime__halt__I(
    This, status));
  }
  {
   JCGO_SYNC_BLOCKSAFENZ(JCGO_FIELD_NZACCESS(This, lock))
   {
    if (JCGO_FIELD_NZACCESS(This, shutdownHooks) != jnull)
    {
     jObject jcgo_rcvrL1;
     (void)(JCGO_CALL_FINALF(JCGO_FIELD_NZACCESS(This, shutdownHooks))
      (jboolean)0);
     (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, exitSequence),
      JCGO_CALL_FINALF((java_lang_Thread)jcgo_rcvrL1) java_lang_Thread__interrupt__(
      (java_lang_Thread)jcgo_rcvrL1));
     status= 0;
    }
   }
   JCGO_SYNC_END
  }
  if (status != 0)
  {
   (java_lang_Runtime__halt__I(
    This, status));
  }
  while (jtrue)
  {
   {
    JCGO_TRY_BLOCK
    {
     jObject jcgo_rcvrL1;
     (jcgo_rcvrL1= (jObject)JCGO_FIELD_NZACCESS(This, exitSequence),
      JCGO_CALL_FINALF((java_lang_Thread)jcgo_rcvrL1) java_lang_Thread__join__(
      (java_lang_Thread)jcgo_rcvrL1));
    }
    JCGO_TRY_LEAVE
    JCGO_TRY_CATCHES(1)
    JCGO_TRY_CATCH(OBJT_java_lang_InterruptedException, MAXT_java_lang_InterruptedException)
    {
    }
    JCGO_TRY_RETHROW(1)
   }
  }
 }
}

JCGO_NOSEP_STATIC jboolean CFASTCALL
java_lang_Runtime__runShutdownHooks__( java_lang_Runtime This )
{
 {
  jboolean first;
  first= jfalse;
  {
   JCGO_SYNC_BLOCKSAFENZ(JCGO_FIELD_NZACCESS(This, lock))
   {
    if (JCGO_FIELD_NZACCESS(This, exitSequence) == jnull)
    {
     first= (jboolean)jtrue;
     JCGO_FIELD_NZACCESS(This, exitSequence)= (java_lang_Thread__currentThread__());
     if (JCGO_FIELD_NZACCESS(This, shutdownHooks) != jnull)
     {
      (JCGO_CALL_FINALF(JCGO_FIELD_NZACCESS(This, shutdownHooks)) (void)0);
     }
    }
   }
   JCGO_SYNC_END
  }
  if (first)
  {
   if (JCGO_FIELD_NZACCESS(This, shutdownHooks) != jnull)
   {
    (JCGO_CALL_FINALF(JCGO_FIELD_NZACCESS(This, shutdownHooks)) (void)0);
    {
     JCGO_SYNC_BLOCKSAFENZ(JCGO_FIELD_NZACCESS(This, lock))
     {
      JCGO_FIELD_NZACCESS(This, shutdownHooks)= (java_lang_Object)jnull;
     }
     JCGO_SYNC_END
    }
   }
   (java_lang_VMRuntime__runFinalizationForExit__());
  }
  return (jboolean)first;
 }
}

JCGO_NOSEP_STATIC void CFASTCALL
java_lang_Runtime__halt__I( java_lang_Runtime This, jint status )
{
 {
  java_lang_SecurityManager sm;
  sm= java_lang_SecurityManager__current;
  if (sm != jnull)
  {
   (java_lang_SecurityManager__checkExit__I(
    sm, status));
  }
  (java_lang_VMRuntime__exit__I(
   status));
 }
}

JCGO_NOSEP_FRWINL void CFASTCALL
java_lang_Runtime__gc__( java_lang_Runtime This )
{
 {
  (java_lang_VMRuntime__gc__());
 }
}

JCGO_NOSEP_FRWINL void CFASTCALL
java_lang_Runtime__runFinalization__( java_lang_Runtime This )
{
 {
  (java_lang_VMRuntime__runFinalization__());
 }
}

JCGO_NOSEP_STATIC void CFASTCALL
java_lang_Runtime__class__0( void )
{
 JCGO_CLINIT_BEGIN(java_lang_Runtime__class);
 java_lang_Runtime__current= java_lang_Runtime__new__();
 JCGO_CLINIT_DONE(java_lang_Runtime__class);
}

JCGO_NOSEP_DATA CONST struct java_lang_Runtime_methods_s java_lang_Runtime_methods=
{
 JCGO_CLASSREF_OF(java_lang_Runtime__class),
 JCGO_GCJDESCR_ZEROINIT
 OBJT_java_lang_Runtime,
 (JCGO_OBJSIZE_T)sizeof(struct java_lang_Runtime_s),
 NULL,
 JCGO_CLINIT_INIT(java_lang_Runtime__class__0)
 0,
 java_lang_Object__equals__Lo,
 java_lang_Object__hashCode__,
 java_lang_Object__toString__,
 java_lang_Object__finalize__
};

JCGO_NOSEP_DATA struct java_lang_Runtime_class_s java_lang_Runtime__class
 ATTRIBNONGC=
{
 {
  &java_lang_Class_methods,
  JCGO_MON_INIT
  JCGO_OBJREF_OF(*(java_lang_Object)&java_lang_Runtime_methods),
  JCGO_STRREF_OF(jcgo_string1_Runtime),
  JCGO_CLASSREF_OF(java_lang_Object__class),
  ((jObjectArr)JCGO_OBJREF_OF(jcgo_array3_Object)),
  0x1c1
 }
};

JCGO_NOSEP_GCDATA java_lang_Runtime java_lang_Runtime__current ATTRIBGCBSS=
 jnull;

JCGO_NOSEP_DATA JCGO_NOTHR_CONST struct java_lang_String_s jcgo_string1_Runtime
 JCGO_THRD_ATTRNONGC=
{
 &java_lang_String_methods,
 JCGO_MON_INIT
 (java_lang_Object)JCGO_OBJREF_OF(jcgo_array2_RntmExcp),
 0, 17, (jint)0x6d23c404L
};

#ifdef CHKALL_java_lang_Runtime
#include "jcgochke.h"
#endif

#endif
