Ignore:
Timestamp:
Apr 27, 2004, 8:39:34 PM (21 years ago)
Author:
bird
Message:

GCC v3.3.3 sources.

Location:
branches/GNU/src/gcc
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/gcc

    • Property svn:ignore
      •  

        old new  
        2626configure.vr
        2727configure.vrs
         28dir.info
        2829Makefile
        29 dir.info
        3030lost+found
        3131update.out
  • branches/GNU/src/gcc/libjava/include/Makefile.in

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    1 # Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
    2 
    3 # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
     1# Makefile.in generated automatically by automake 1.4 from Makefile.am
     2
     3# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
    44# This Makefile.in is free software; the Free Software Foundation
    55# gives unlimited permission to copy and/or distribute it,
     
    6464target_alias = @target_alias@
    6565target_triplet = @target@
    66 AM_RUNTESTFLAGS = @AM_RUNTESTFLAGS@
    6766AR = @AR@
    6867AS = @AS@
     68BACKTRACESPEC = @BACKTRACESPEC@
    6969CC = @CC@
    7070CHECKREFSPEC = @CHECKREFSPEC@
     
    8888GCTESTSPEC = @GCTESTSPEC@
    8989HASH_SYNC_SPEC = @HASH_SYNC_SPEC@
     90IEEESPEC = @IEEESPEC@
    9091INCLTDL = @INCLTDL@
     92INTERPRETER = @INTERPRETER@
    9193JC1GCSPEC = @JC1GCSPEC@
    9294LIBFFI = @LIBFFI@
     
    130132mkinstalldirs = @mkinstalldirs@
    131133tool_include_dir = @tool_include_dir@
     134toolexecdir = @toolexecdir@
     135toolexeclibdir = @toolexeclibdir@
     136toolexecmainlibdir = @toolexecmainlibdir@
    132137
    133138AUTOMAKE_OPTIONS = foreign
  • branches/GNU/src/gcc/libjava/include/config.h.in

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    133133#undef HAVE_GETHOSTBYNAME_R
    134134#undef HAVE_GETHOSTBYADDR_R
     135#undef HAVE_FTRUNCATE
    135136
    136137/* Define if you want a bytecode interpreter.  */
     
    175176#undef ENABLE_JVMPI
    176177
     178/* Define if your platform has a working backtrace() function.  */
     179#undef HAVE_BACKTRACE
     180
     181/* Define if your platform has the global _timezone variable.  */
     182#undef HAVE_UNDERSCORE_TIMEZONE
     183
    177184/* Define if you have the access function.  */
    178185#undef HAVE_ACCESS
    179186
    180 /* Define if you have the backtrace function.  */
    181 #undef HAVE_BACKTRACE
    182 
    183187/* Define if you have the chmod function.  */
    184188#undef HAVE_CHMOD
     
    199203#undef HAVE_FTIME
    200204
     205/* Define if you have the ftruncate function.  */
     206#undef HAVE_FTRUNCATE
     207
    201208/* Define if you have the getcwd function.  */
    202209#undef HAVE_GETCWD
     
    337344#undef HAVE_LOCALE_H
    338345
     346/* Define if you have the <net/if.h> header file.  */
     347#undef HAVE_NET_IF_H
     348
    339349/* Define if you have the <netdb.h> header file.  */
    340350#undef HAVE_NETDB_H
     
    385395#undef SJLJ_EXCEPTIONS
    386396
     397/* Indicate that linker is not able to 8-byte align static data */
     398#undef JV_LINKER_CANNOT_8BYTE_ALIGN_STATICS
     399
    387400/* Required define if using POSIX threads */
    388401#undef _REENTRANT
     
    415428#undef SIZEOF_VOID_P
    416429
    417 /* Short GCJ version */
     430/* Short GCJ version ID */
    418431#undef GCJVERSION
    419432
  • branches/GNU/src/gcc/libjava/include/i386-signal.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    109109};
    110110
    111 #define INIT_SEGV                                               \
    112 do                                                              \
    113   {                                                             \
    114     nullp = new java::lang::NullPointerException ();            \
     111#define RESTORE(name, syscall) RESTORE2 (name, syscall)
     112# define RESTORE2(name, syscall) \
     113asm                                             \
     114  (                                             \
     115   ".text\n"                                    \
     116   ".byte 0  # Yes, this really is necessary\n" \
     117   "    .align 8\n"                             \
     118   "__" #name ":\n"                             \
     119   "    popl %eax\n"                            \
     120   "    movl $" #syscall ", %eax\n"             \
     121   "    int  $0x80"                             \
     122   );
     123
     124RESTORE (restore, __NR_sigreturn)
     125static void restore (void) asm ("__restore");
     126
     127#define INIT_SEGV                                       \
     128do                                                      \
     129  {                                                     \
     130    nullp = new java::lang::NullPointerException ();    \
    115131    struct old_i386_kernel_sigaction kact;              \
    116132    kact.k_sa_handler = catch_segv;                     \
    117133    kact.k_sa_mask = 0;                                 \
    118     kact.k_sa_flags = 0;                                \
     134    kact.k_sa_flags = 0x4000000;                        \
     135    kact.sa_restorer = restore;                         \
    119136    syscall (SYS_sigaction, SIGSEGV, &kact, NULL);      \
    120   }                                                             \
     137  }                                                     \
    121138while (0) 
    122139
    123140#define INIT_FPE                                                \
    124141do                                                              \
    125   {                                                             \
    126     arithexception = new java::lang::ArithmeticException        \
     142  {                                                             \
     143    arithexception = new java::lang::ArithmeticException        \
    127144      (JvNewStringLatin1 ("/ by zero"));                        \
    128145    struct old_i386_kernel_sigaction kact;                      \
    129146    kact.k_sa_handler = catch_fpe;                              \
    130147    kact.k_sa_mask = 0;                                         \
    131     kact.k_sa_flags = 0;                                        \
     148    kact.k_sa_flags = 0x4000000;                                \
     149    kact.sa_restorer = restore;                                 \
    132150    syscall (SYS_sigaction, SIGFPE, &kact, NULL);               \
    133151  }                                                             \
     
    148166 * Also, there is at the present time no unwind info in the
    149167 * linuxthreads library's signal handlers and so we can't unwind
    150  * through them anyway. 
    151 
    152  * Finally, the code that glibc uses to return from a signal handler
    153  * is subject to change.  */
     168 * through them anyway.  */
    154169
    155170#endif /* JAVA_SIGNAL_H */
  • branches/GNU/src/gcc/libjava/include/java-insns.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11// java-insns.h - Instruction encodings. This is -*- c++ -*-
    22
    3 /* Copyright (C) 1999, 2001  Free Software Foundation
     3/* Copyright (C) 1999, 2001, 2002  Free Software Foundation
    44
    55   This file is part of libgcj.
     
    200200  op_invokestatic = 0xb8,
    201201  op_invokeinterface = 0xb9,
    202   op_xxxunusedxxx1 = 0xba,
     202
     203  // 0xba is unused.
     204
    203205  op_new = 0xbb,
    204206  op_newarray = 0xbc,
  • branches/GNU/src/gcc/libjava/include/java-interp.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11// java-interp.h - Header file for the bytecode interpreter.  -*- c++ -*-
    22
    3 /* Copyright (C) 1999, 2000, 2001  Free Software Foundation
     3/* Copyright (C) 1999, 2000, 2001, 2002  Free Software Foundation
    44
    55   This file is part of libgcj.
     
    1414#include <jvm.h>
    1515#include <java-cpool.h>
     16#include <gnu/gcj/runtime/NameFinder.h>
    1617
    1718#ifdef INTERPRETER
     
    2122#include <java/lang/Class.h>
    2223#include <java/lang/ClassLoader.h>
     24#include <java/lang/reflect/Modifier.h>
     25#include <gnu/gcj/runtime/StackTrace.h>
    2326
    2427extern "C" {
     
    2932_Jv_IsInterpretedClass (jclass c)
    3033{
    31   return (c->loader != 0);
     34  return (c->accflags & java::lang::reflect::Modifier::INTERPRETED) != 0;
    3235}
    3336
     
    5053class _Jv_InterpClass;
    5154class _Jv_InterpMethod;
    52 class _Jv_InterpMethodInvocation;
     55
     56// Before a method is "compiled" we store values as the bytecode PC,
     57// an int.  Afterwards we store them as pointers into the prepared
     58// code itself.
     59union _Jv_InterpPC
     60{
     61  int i;
     62  void *p;
     63};
    5364
    5465class _Jv_InterpException
    5566{
    56   int start_pc;
    57   int end_pc;
    58   int handler_pc;
    59   int handler_type;
     67  _Jv_InterpPC start_pc;
     68  _Jv_InterpPC end_pc;
     69  _Jv_InterpPC handler_pc;
     70  _Jv_InterpPC handler_type;
    6071
    6172  friend class _Jv_ClassReader;
     
    92103
    93104  _Jv_ushort       exc_count;
     105
     106  void *prepared;
    94107
    95108  unsigned char* bytecode ()
     
    100113               + exc_count*sizeof (_Jv_InterpException)), 4);
    101114  }
    102    
     115
    103116  _Jv_InterpException * exceptions ()
    104117  {
     
    116129  // return the method's invocation pointer (a stub).
    117130  void *ncode ();
    118   void continue1 (_Jv_InterpMethodInvocation *inv);
     131  void compile (const void * const *);
    119132
    120133  static void run_normal (ffi_cif*, void*, ffi_raw*, void*);
     
    122135  static void run_synch_class (ffi_cif*, void*, ffi_raw*, void*);
    123136
    124   inline jobject run (ffi_cif*, void*, ffi_raw*,
    125                       _Jv_InterpMethodInvocation*);
    126 
    127   bool find_exception (jobject ex,
    128                        _Jv_InterpMethodInvocation *inv);
     137  void run (void*, ffi_raw *);
    129138
    130139 public:
     
    132141
    133142  friend class _Jv_ClassReader;
    134   friend class _Jv_InterpMethodInvocation;
    135143  friend class _Jv_BytecodeVerifier;
     144  friend class gnu::gcj::runtime::NameFinder;
     145  friend class gnu::gcj::runtime::StackTrace;
    136146
    137147  friend void _Jv_PrepareClass(jclass);
    138 };
    139 
    140 class _Jv_InterpMethodInvocation {
    141   _Jv_InterpMethod *running;
    142   _Jv_word         *sp;
    143   unsigned char    *pc;
    144   _Jv_word          state[0];
    145 
    146   _Jv_word*         stack_base () { return &state[0]; }
    147   _Jv_word*         local_base () { return &state[running->max_stack]; }
    148 
    149   friend class _Jv_InterpMethod;
    150 };
    151  
     148
     149#ifdef JV_MARKOBJ_DECL
     150  friend JV_MARKOBJ_DECL;
     151#endif
     152};
     153
    152154class _Jv_InterpClass : public java::lang::Class
    153155{
     
    158160  friend class _Jv_InterpMethod;
    159161  friend void  _Jv_PrepareClass(jclass);
     162  friend void  _Jv_PrepareMissingMethods (jclass base2, jclass iface_class);
    160163  friend void  _Jv_InitField (jobject, jclass, int);
    161164#ifdef JV_MARKOBJ_DECL
     
    213216};
    214217
     218// A structure of this type is used to link together interpreter
     219// invocations on the stack.
     220struct _Jv_MethodChain
     221{
     222  const _Jv_InterpMethod *self;
     223  _Jv_MethodChain **ptr;
     224  _Jv_MethodChain *next;
     225
     226  _Jv_MethodChain (const _Jv_InterpMethod *s, _Jv_MethodChain **n)
     227  {
     228    self = s;
     229    ptr = n;
     230    next = *n;
     231    *n = this;
     232  }
     233
     234  ~_Jv_MethodChain ()
     235  {
     236    *ptr = next;
     237  }
     238};
     239
    215240#endif /* INTERPRETER */
    216241
  • branches/GNU/src/gcc/libjava/include/jni.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    162162#define JNI_VERSION_1_1 0x00010001
    163163#define JNI_VERSION_1_2 0x00010002
     164#define JNI_VERSION_1_4 0x00010004
    164165
    165166/* Used when releasing array elements.  */
     
    173174#define JNI_EVERSION     -3
    174175
    175 /* Linkage and calling conventions.  This will need updating when we
    176    support Windows DLLs.  */
     176/* Linkage and calling conventions. */
     177#if defined (_WIN32) || defined (__WIN32__) || defined (WIN32)
     178
     179#define JNIIMPORT        __declspec(dllimport)
     180#define JNIEXPORT        __declspec(dllexport)
     181#define JNICALL          __stdcall
     182
     183#else
     184
    177185#define JNIIMPORT
    178186#define JNIEXPORT
    179187#define JNICALL
     188
     189#endif /* !( _WIN32 || __WIN32__ || WIN32) */
     190
     191#ifdef __GCJ_JNI_IMPL__
     192#define JNIIMPEXP JNIEXPORT
     193#else
     194#define JNIIMPEXP JNIIMPORT
     195#endif /* ! __GCJ_JNI_IMPL__ */
    180196
    181197#ifdef __cplusplus
     
    186202/* These functions might be defined in libraries which we load; the
    187203   JNI implementation calls them at the appropriate times.  */
    188 extern jint JNI_OnLoad (JavaVM *, void *);
    189 extern void JNI_OnUnload (JavaVM *, void *);
     204extern JNIEXPORT jint JNICALL JNI_OnLoad (JavaVM *, void *);
     205extern JNIEXPORT void JNICALL JNI_OnUnload (JavaVM *, void *);
    190206
    191207/* These functions are called by user code to start using the
    192208   invocation API.  */
    193 extern jint JNI_GetDefaultJavaVMInitArgs (void *);
    194 extern jint JNI_CreateJavaVM (JavaVM **, void **, void *);
    195 extern jint JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *);
     209extern JNIIMPEXP jint JNICALL JNI_GetDefaultJavaVMInitArgs (void *);
     210extern JNIIMPEXP jint JNICALL JNI_CreateJavaVM (JavaVM **, void **, void *);
     211extern JNIIMPEXP jint JNICALL JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *);
    196212
    197213#ifdef __cplusplus
     
    233249  _Jv_func reserved3;
    234250
    235   jint     (*GetVersion)                   (JNIEnv *);
    236   jclass   (*DefineClass)                  (JNIEnv *, jobject,
    237                                             const jbyte *, jsize);
    238   jclass   (*FindClass)                    (JNIEnv *, const char *);
    239 
    240   jmethodID (*FromReflectedMethod)         (JNIEnv *, jobject);
    241   jfieldID  (*FromReflectedField)          (JNIEnv *, jobject);
    242   jobject   (*ToReflectedMethod)           (JNIEnv *, jclass, jmethodID,
    243                                             jboolean);
    244 
    245   jclass   (*GetSuperclass)                (JNIEnv *, jclass);
    246   jboolean (*IsAssignableFrom)             (JNIEnv *, jclass, jclass);
    247 
    248   jobject  (*ToReflectedField)             (JNIEnv *, jclass, jfieldID,
    249                                             jboolean);
    250 
    251   jint     (*Throw)                        (JNIEnv *, jthrowable);
    252   jint     (*ThrowNew)                     (JNIEnv *, jclass, const char *);
    253   jthrowable (*ExceptionOccurred)          (JNIEnv *);
    254   void     (*ExceptionDescribe)            (JNIEnv *);
    255   void     (*ExceptionClear)               (JNIEnv *);
    256   void     (*FatalError)                   (JNIEnv *, const char *);
    257 
    258   jint     (*PushLocalFrame)               (JNIEnv *, jint);
    259   jobject  (*PopLocalFrame)                (JNIEnv *, jobject);
    260 
    261   jobject  (*NewGlobalRef)                 (JNIEnv *, jobject);
    262   void     (*DeleteGlobalRef)              (JNIEnv *, jobject);
    263   void     (*DeleteLocalRef)               (JNIEnv *, jobject);
    264   jboolean (*IsSameObject)                 (JNIEnv *, jobject, jobject);
    265 
    266   jobject  (*NewLocalRef)                  (JNIEnv *, jobject);
    267   jint     (*EnsureLocalCapacity)          (JNIEnv *, jint);
    268 
    269   jobject  (*AllocObject)                  (JNIEnv *, jclass);
    270   jobject (*NewObject)                     (JNIEnv *, jclass, jmethodID, ...);
    271   jobject (*NewObjectV)                    (JNIEnv *, jclass, jmethodID,
    272                                             _Jv_va_list);
    273   jobject (*NewObjectA)                    (JNIEnv *, jclass, jmethodID,
    274                                             jvalue *);
    275 
    276   jclass   (*GetObjectClass)               (JNIEnv *, jobject);
    277   jboolean (*IsInstanceOf)                 (JNIEnv *, jobject, jclass);
    278   jmethodID (*GetMethodID)                 (JNIEnv *, jclass, const char *,
     251  jint     (JNICALL *GetVersion)                   (JNIEnv *);
     252  jclass   (JNICALL *DefineClass)                  (JNIEnv *, const char *,
     253                                                    jobject, const jbyte *,
     254                                                    jsize);
     255  jclass   (JNICALL *FindClass)                    (JNIEnv *, const char *);
     256
     257  jmethodID (JNICALL *FromReflectedMethod)         (JNIEnv *, jobject);
     258  jfieldID  (JNICALL *FromReflectedField)          (JNIEnv *, jobject);
     259  jobject   (JNICALL *ToReflectedMethod)           (JNIEnv *, jclass,
     260                                                    jmethodID, jboolean);
     261
     262  jclass   (JNICALL *GetSuperclass)                (JNIEnv *, jclass);
     263  jboolean (JNICALL *IsAssignableFrom)             (JNIEnv *, jclass, jclass);
     264
     265  jobject  (JNICALL *ToReflectedField)             (JNIEnv *, jclass, jfieldID,
     266                                                    jboolean);
     267
     268  jint     (JNICALL *Throw)                        (JNIEnv *, jthrowable);
     269  jint     (JNICALL *ThrowNew)                     (JNIEnv *, jclass,
     270                                                    const char *);
     271  jthrowable (JNICALL *ExceptionOccurred)          (JNIEnv *);
     272  void     (JNICALL *ExceptionDescribe)            (JNIEnv *);
     273  void     (JNICALL *ExceptionClear)               (JNIEnv *);
     274  void     (JNICALL *FatalError)                   (JNIEnv *, const char *);
     275
     276  jint     (JNICALL *PushLocalFrame)               (JNIEnv *, jint);
     277  jobject  (JNICALL *PopLocalFrame)                (JNIEnv *, jobject);
     278
     279  jobject  (JNICALL *NewGlobalRef)                 (JNIEnv *, jobject);
     280  void     (JNICALL *DeleteGlobalRef)              (JNIEnv *, jobject);
     281  void     (JNICALL *DeleteLocalRef)               (JNIEnv *, jobject);
     282  jboolean (JNICALL *IsSameObject)                 (JNIEnv *, jobject,
     283                                                    jobject);
     284
     285  jobject  (JNICALL *NewLocalRef)                  (JNIEnv *, jobject);
     286  jint     (JNICALL *EnsureLocalCapacity)          (JNIEnv *, jint);
     287
     288  jobject  (JNICALL *AllocObject)                  (JNIEnv *, jclass);
     289  jobject (JNICALL *NewObject)                     (JNIEnv *, jclass,
     290                                                    jmethodID, ...);
     291  jobject (JNICALL *NewObjectV)                    (JNIEnv *, jclass,
     292                                                    jmethodID, _Jv_va_list);
     293  jobject (JNICALL *NewObjectA)                    (JNIEnv *, jclass,
     294                                                    jmethodID, jvalue *);
     295
     296  jclass   (JNICALL *GetObjectClass)               (JNIEnv *, jobject);
     297  jboolean (JNICALL *IsInstanceOf)                 (JNIEnv *, jobject, jclass);
     298  jmethodID (JNICALL *GetMethodID)                 (JNIEnv *, jclass,
     299                                                    const char *, const char *);
     300
     301  jobject (JNICALL *CallObjectMethod)      (JNIEnv *, jobject, jmethodID, ...);
     302  jobject (JNICALL *CallObjectMethodV)     (JNIEnv *, jobject, jmethodID,
     303                                            _Jv_va_list);
     304  jobject (JNICALL *CallObjectMethodA)     (JNIEnv *, jobject, jmethodID,
     305                                            jvalue *);
     306  jboolean (JNICALL *CallBooleanMethod)    (JNIEnv *, jobject, jmethodID,
     307                                            ...);
     308  jboolean (JNICALL *CallBooleanMethodV)   (JNIEnv *, jobject, jmethodID,
     309                                            _Jv_va_list);
     310  jboolean (JNICALL *CallBooleanMethodA)   (JNIEnv *, jobject, jmethodID,
     311                                            jvalue *);
     312  jbyte (JNICALL *CallByteMethod)   (JNIEnv *, jobject, jmethodID, ...);
     313  jbyte (JNICALL *CallByteMethodV)         (JNIEnv *, jobject, jmethodID,
     314                                            _Jv_va_list);
     315  jbyte (JNICALL *CallByteMethodA)         (JNIEnv *, jobject, jmethodID,
     316                                            jvalue *);
     317  jchar (JNICALL *CallCharMethod)          (JNIEnv *, jobject, jmethodID, ...);
     318  jchar (JNICALL *CallCharMethodV)         (JNIEnv *, jobject, jmethodID,
     319                                            _Jv_va_list);
     320  jchar (JNICALL *CallCharMethodA)         (JNIEnv *, jobject, jmethodID,
     321                                            jvalue *);
     322  jshort (JNICALL *CallShortMethod)        (JNIEnv *, jobject, jmethodID, ...);
     323  jshort (JNICALL *CallShortMethodV)       (JNIEnv *, jobject, jmethodID,
     324                                            _Jv_va_list);
     325  jshort (JNICALL *CallShortMethodA)       (JNIEnv *, jobject, jmethodID,
     326                                            jvalue *);
     327  jint  (JNICALL *CallIntMethod)           (JNIEnv *, jobject, jmethodID, ...);
     328  jint  (JNICALL *CallIntMethodV)          (JNIEnv *, jobject, jmethodID,
     329                                            _Jv_va_list);
     330  jint  (JNICALL *CallIntMethodA)          (JNIEnv *, jobject, jmethodID,
     331                                            jvalue *);
     332  jlong (JNICALL *CallLongMethod)          (JNIEnv *, jobject, jmethodID, ...);
     333  jlong (JNICALL *CallLongMethodV)         (JNIEnv *, jobject, jmethodID,
     334                                            _Jv_va_list);
     335  jlong (JNICALL *CallLongMethodA)         (JNIEnv *, jobject, jmethodID,
     336                                            jvalue *);
     337  jfloat (JNICALL *CallFloatMethod)        (JNIEnv *, jobject, jmethodID, ...);
     338  jfloat (JNICALL *CallFloatMethodV)       (JNIEnv *, jobject, jmethodID,
     339                                            _Jv_va_list);
     340  jfloat (JNICALL *CallFloatMethodA)       (JNIEnv *, jobject, jmethodID,
     341                                            jvalue *);
     342  jdouble (JNICALL *CallDoubleMethod)      (JNIEnv *, jobject, jmethodID, ...);
     343  jdouble (JNICALL *CallDoubleMethodV)     (JNIEnv *, jobject, jmethodID,
     344                                            _Jv_va_list);
     345  jdouble (JNICALL *CallDoubleMethodA)     (JNIEnv *, jobject, jmethodID,
     346                                            jvalue *);
     347  void  (JNICALL *CallVoidMethod)          (JNIEnv *, jobject, jmethodID, ...);
     348  void  (JNICALL *CallVoidMethodV)         (JNIEnv *, jobject, jmethodID,
     349                                            _Jv_va_list);
     350  void  (JNICALL *CallVoidMethodA)         (JNIEnv *, jobject, jmethodID,
     351                                            jvalue *);
     352
     353  jobject   (JNICALL *CallNonvirtualObjectMethod)  (JNIEnv *, jobject, jclass,
     354                                                    jmethodID, ...);
     355  jobject   (JNICALL *CallNonvirtualObjectMethodV) (JNIEnv *, jobject, jclass,
     356                                                    jmethodID, _Jv_va_list);
     357  jobject   (JNICALL *CallNonvirtualObjectMethodA) (JNIEnv *, jobject, jclass,
     358                                                    jmethodID, jvalue *);
     359  jboolean  (JNICALL *CallNonvirtualBooleanMethod) (JNIEnv *, jobject, jclass,
     360                                                    jmethodID, ...);
     361  jboolean  (JNICALL *CallNonvirtualBooleanMethodV) (JNIEnv *, jobject, jclass,
     362                                                     jmethodID, _Jv_va_list);
     363  jboolean  (JNICALL *CallNonvirtualBooleanMethodA) (JNIEnv *, jobject, jclass,
     364                                                     jmethodID, jvalue *);
     365  jbyte     (JNICALL *CallNonvirtualByteMethod)    (JNIEnv *, jobject, jclass,
     366                                                    jmethodID, ...);
     367  jbyte     (JNICALL *CallNonvirtualByteMethodV)   (JNIEnv *, jobject, jclass,
     368                                                    jmethodID, _Jv_va_list);
     369  jbyte     (JNICALL *CallNonvirtualByteMethodA)   (JNIEnv *, jobject, jclass,
     370                                                    jmethodID, jvalue *);
     371  jchar     (JNICALL *CallNonvirtualCharMethod)    (JNIEnv *, jobject, jclass,
     372                                                    jmethodID, ...);
     373  jchar     (JNICALL *CallNonvirtualCharMethodV)   (JNIEnv *, jobject, jclass,
     374                                                    jmethodID, _Jv_va_list);
     375  jchar     (JNICALL *CallNonvirtualCharMethodA)   (JNIEnv *, jobject, jclass,
     376                                                    jmethodID, jvalue *);
     377  jshort    (JNICALL *CallNonvirtualShortMethod)   (JNIEnv *, jobject, jclass,
     378                                                    jmethodID, ...);
     379  jshort    (JNICALL *CallNonvirtualShortMethodV)  (JNIEnv *, jobject, jclass,
     380                                                    jmethodID, _Jv_va_list);
     381  jshort    (JNICALL *CallNonvirtualShortMethodA)  (JNIEnv *, jobject, jclass,
     382                                                    jmethodID, jvalue *);
     383  jint      (JNICALL *CallNonvirtualIntMethod)     (JNIEnv *, jobject, jclass,
     384                                                    jmethodID, ...);
     385  jint      (JNICALL *CallNonvirtualIntMethodV)    (JNIEnv *, jobject, jclass,
     386                                                    jmethodID, _Jv_va_list);
     387  jint      (JNICALL *CallNonvirtualIntMethodA)    (JNIEnv *, jobject, jclass,
     388                                                    jmethodID, jvalue *);
     389  jlong     (JNICALL *CallNonvirtualLongMethod)    (JNIEnv *, jobject, jclass,
     390                                                    jmethodID, ...);
     391  jlong     (JNICALL *CallNonvirtualLongMethodV)   (JNIEnv *, jobject, jclass,
     392                                                    jmethodID, _Jv_va_list);
     393  jlong     (JNICALL *CallNonvirtualLongMethodA)   (JNIEnv *, jobject, jclass,
     394                                                    jmethodID, jvalue *);
     395  jfloat    (JNICALL *CallNonvirtualFloatMethod)   (JNIEnv *, jobject, jclass,
     396                                                    jmethodID, ...);
     397  jfloat    (JNICALL *CallNonvirtualFloatMethodV)  (JNIEnv *, jobject, jclass,
     398                                                    jmethodID, _Jv_va_list);
     399  jfloat    (JNICALL *CallNonvirtualFloatMethodA)  (JNIEnv *, jobject, jclass,
     400                                                    jmethodID, jvalue *);
     401  jdouble   (JNICALL *CallNonvirtualDoubleMethod)  (JNIEnv *, jobject, jclass,
     402                                                    jmethodID, ...);
     403  jdouble   (JNICALL *CallNonvirtualDoubleMethodV) (JNIEnv *, jobject, jclass,
     404                                                    jmethodID, _Jv_va_list);
     405  jdouble   (JNICALL *CallNonvirtualDoubleMethodA) (JNIEnv *, jobject, jclass,
     406                                                    jmethodID, jvalue *);
     407  void      (JNICALL *CallNonvirtualVoidMethod)    (JNIEnv *, jobject, jclass,
     408                                                    jmethodID, ...);
     409  void      (JNICALL *CallNonvirtualVoidMethodV)   (JNIEnv *, jobject, jclass,
     410                                                    jmethodID, _Jv_va_list);
     411  void      (JNICALL *CallNonvirtualVoidMethodA)   (JNIEnv *, jobject, jclass,
     412                                                    jmethodID, jvalue *);
     413
     414  jfieldID  (JNICALL *GetFieldID)          (JNIEnv *, jclass, const char *,
    279415                                            const char *);
    280416
    281   jobject       (*CallObjectMethod)        (JNIEnv *, jobject, jmethodID,
    282                                             ...);
    283   jobject       (*CallObjectMethodV)       (JNIEnv *, jobject, jmethodID,
    284                                             _Jv_va_list);
    285   jobject       (*CallObjectMethodA)       (JNIEnv *, jobject, jmethodID,
    286                                             jvalue *);
    287   jboolean      (*CallBooleanMethod)       (JNIEnv *, jobject, jmethodID,
    288                                             ...);
    289   jboolean      (*CallBooleanMethodV)      (JNIEnv *, jobject, jmethodID,
    290                                             _Jv_va_list);
    291   jboolean      (*CallBooleanMethodA)      (JNIEnv *, jobject, jmethodID,
    292                                             jvalue *);
    293   jbyte         (*CallByteMethod)          (JNIEnv *, jobject, jmethodID,
    294                                             ...);
    295   jbyte         (*CallByteMethodV)         (JNIEnv *, jobject, jmethodID,
    296                                             _Jv_va_list);
    297   jbyte         (*CallByteMethodA)         (JNIEnv *, jobject, jmethodID,
    298                                             jvalue *);
    299   jchar         (*CallCharMethod)          (JNIEnv *, jobject, jmethodID,
    300                                             ...);
    301   jchar         (*CallCharMethodV)         (JNIEnv *, jobject, jmethodID,
    302                                             _Jv_va_list);
    303   jchar         (*CallCharMethodA)         (JNIEnv *, jobject, jmethodID,
    304                                             jvalue *);
    305   jshort        (*CallShortMethod)         (JNIEnv *, jobject, jmethodID,
    306                                             ...);
    307   jshort        (*CallShortMethodV)        (JNIEnv *, jobject, jmethodID,
    308                                             _Jv_va_list);
    309   jshort        (*CallShortMethodA)        (JNIEnv *, jobject, jmethodID,
    310                                             jvalue *);
    311   jint          (*CallIntMethod)           (JNIEnv *, jobject, jmethodID,
    312                                             ...);
    313   jint          (*CallIntMethodV)          (JNIEnv *, jobject, jmethodID,
    314                                             _Jv_va_list);
    315   jint          (*CallIntMethodA)          (JNIEnv *, jobject, jmethodID,
    316                                             jvalue *);
    317   jlong         (*CallLongMethod)          (JNIEnv *, jobject, jmethodID,
    318                                             ...);
    319   jlong         (*CallLongMethodV)         (JNIEnv *, jobject, jmethodID,
    320                                             _Jv_va_list);
    321   jlong         (*CallLongMethodA)         (JNIEnv *, jobject, jmethodID,
    322                                             jvalue *);
    323   jfloat        (*CallFloatMethod)         (JNIEnv *, jobject, jmethodID,
    324                                             ...);
    325   jfloat        (*CallFloatMethodV)        (JNIEnv *, jobject, jmethodID,
    326                                             _Jv_va_list);
    327   jfloat        (*CallFloatMethodA)        (JNIEnv *, jobject, jmethodID,
    328                                             jvalue *);
    329   jdouble       (*CallDoubleMethod)        (JNIEnv *, jobject, jmethodID,
    330                                             ...);
    331   jdouble       (*CallDoubleMethodV)       (JNIEnv *, jobject, jmethodID,
    332                                             _Jv_va_list);
    333   jdouble       (*CallDoubleMethodA)       (JNIEnv *, jobject, jmethodID,
    334                                             jvalue *);
    335   void          (*CallVoidMethod)          (JNIEnv *, jobject, jmethodID,
    336                                             ...);
    337   void          (*CallVoidMethodV)         (JNIEnv *, jobject, jmethodID,
    338                                             _Jv_va_list);
    339   void          (*CallVoidMethodA)         (JNIEnv *, jobject, jmethodID,
    340                                             jvalue *);
    341 
    342   jobject   (*CallNonvirtualObjectMethod)  (JNIEnv *, jobject, jclass,
    343                                             jmethodID, ...);
    344   jobject   (*CallNonvirtualObjectMethodV) (JNIEnv *, jobject, jclass,
    345                                             jmethodID, _Jv_va_list);
    346   jobject   (*CallNonvirtualObjectMethodA) (JNIEnv *, jobject, jclass,
    347                                             jmethodID, jvalue *);
    348   jboolean  (*CallNonvirtualBooleanMethod) (JNIEnv *, jobject, jclass,
    349                                             jmethodID, ...);
    350   jboolean  (*CallNonvirtualBooleanMethodV) (JNIEnv *, jobject, jclass,
    351                                              jmethodID, _Jv_va_list);
    352   jboolean  (*CallNonvirtualBooleanMethodA) (JNIEnv *, jobject, jclass,
    353                                              jmethodID, jvalue *);
    354   jbyte     (*CallNonvirtualByteMethod)    (JNIEnv *, jobject, jclass,
    355                                             jmethodID, ...);
    356   jbyte     (*CallNonvirtualByteMethodV)   (JNIEnv *, jobject, jclass,
    357                                             jmethodID, _Jv_va_list);
    358   jbyte     (*CallNonvirtualByteMethodA)   (JNIEnv *, jobject, jclass,
    359                                             jmethodID, jvalue *);
    360   jchar     (*CallNonvirtualCharMethod)    (JNIEnv *, jobject, jclass,
    361                                             jmethodID, ...);
    362   jchar     (*CallNonvirtualCharMethodV)   (JNIEnv *, jobject, jclass,
    363                                             jmethodID, _Jv_va_list);
    364   jchar     (*CallNonvirtualCharMethodA)   (JNIEnv *, jobject, jclass,
    365                                             jmethodID, jvalue *);
    366   jshort    (*CallNonvirtualShortMethod)   (JNIEnv *, jobject, jclass,
    367                                             jmethodID, ...);
    368   jshort    (*CallNonvirtualShortMethodV)  (JNIEnv *, jobject, jclass,
    369                                             jmethodID, _Jv_va_list);
    370   jshort    (*CallNonvirtualShortMethodA)  (JNIEnv *, jobject, jclass,
    371                                             jmethodID, jvalue *);
    372   jint      (*CallNonvirtualIntMethod)     (JNIEnv *, jobject, jclass,
    373                                             jmethodID, ...);
    374   jint      (*CallNonvirtualIntMethodV)    (JNIEnv *, jobject, jclass,
    375                                             jmethodID, _Jv_va_list);
    376   jint      (*CallNonvirtualIntMethodA)    (JNIEnv *, jobject, jclass,
    377                                             jmethodID, jvalue *);
    378   jlong     (*CallNonvirtualLongMethod)    (JNIEnv *, jobject, jclass,
    379                                             jmethodID, ...);
    380   jlong     (*CallNonvirtualLongMethodV)   (JNIEnv *, jobject, jclass,
    381                                             jmethodID, _Jv_va_list);
    382   jlong     (*CallNonvirtualLongMethodA)   (JNIEnv *, jobject, jclass,
    383                                             jmethodID, jvalue *);
    384   jfloat    (*CallNonvirtualFloatMethod)   (JNIEnv *, jobject, jclass,
    385                                             jmethodID, ...);
    386   jfloat    (*CallNonvirtualFloatMethodV)  (JNIEnv *, jobject, jclass,
    387                                             jmethodID, _Jv_va_list);
    388   jfloat    (*CallNonvirtualFloatMethodA)  (JNIEnv *, jobject, jclass,
    389                                             jmethodID, jvalue *);
    390   jdouble   (*CallNonvirtualDoubleMethod)  (JNIEnv *, jobject, jclass,
    391                                             jmethodID, ...);
    392   jdouble   (*CallNonvirtualDoubleMethodV) (JNIEnv *, jobject, jclass,
    393                                             jmethodID, _Jv_va_list);
    394   jdouble   (*CallNonvirtualDoubleMethodA) (JNIEnv *, jobject, jclass,
    395                                             jmethodID, jvalue *);
    396   void      (*CallNonvirtualVoidMethod)    (JNIEnv *, jobject, jclass,
    397                                             jmethodID, ...);
    398   void      (*CallNonvirtualVoidMethodV)   (JNIEnv *, jobject, jclass,
    399                                             jmethodID, _Jv_va_list);
    400   void      (*CallNonvirtualVoidMethodA)   (JNIEnv *, jobject, jclass,
    401                                             jmethodID, jvalue *);
    402 
    403   jfieldID      (*GetFieldID)              (JNIEnv *, jclass, const char *,
     417  jobject  (JNICALL *GetObjectField)       (JNIEnv *, jobject, jfieldID);
     418  jboolean (JNICALL *GetBooleanField)      (JNIEnv *, jobject, jfieldID);
     419  jbyte    (JNICALL *GetByteField)         (JNIEnv *, jobject, jfieldID);
     420  jchar    (JNICALL *GetCharField)         (JNIEnv *, jobject, jfieldID);
     421  jshort   (JNICALL *GetShortField)        (JNIEnv *, jobject, jfieldID);
     422  jint     (JNICALL *GetIntField)          (JNIEnv *, jobject, jfieldID);
     423  jlong    (JNICALL *GetLongField)         (JNIEnv *, jobject, jfieldID);
     424  jfloat   (JNICALL *GetFloatField)        (JNIEnv *, jobject, jfieldID);
     425  jdouble  (JNICALL *GetDoubleField)       (JNIEnv *, jobject, jfieldID);
     426
     427  void  (JNICALL *SetObjectField)          (JNIEnv *, jobject,
     428                                            jfieldID, jobject);
     429  void  (JNICALL *SetBooleanField)         (JNIEnv *, jobject,
     430                                            jfieldID, jboolean);
     431  void  (JNICALL *SetByteField)            (JNIEnv *, jobject,
     432                                            jfieldID, jbyte);
     433  void  (JNICALL *SetCharField)            (JNIEnv *, jobject,
     434                                            jfieldID, jchar);
     435  void  (JNICALL *SetShortField)           (JNIEnv *, jobject,
     436                                            jfieldID, jshort);
     437  void  (JNICALL *SetIntField)             (JNIEnv *, jobject,
     438                                            jfieldID, jint);
     439  void  (JNICALL *SetLongField)            (JNIEnv *, jobject,
     440                                            jfieldID, jlong);
     441  void  (JNICALL *SetFloatField)           (JNIEnv *, jobject,
     442                                            jfieldID, jfloat);
     443  void  (JNICALL *SetDoubleField)          (JNIEnv *, jobject,
     444                                            jfieldID, jdouble);
     445
     446  jmethodID (JNICALL *GetStaticMethodID)   (JNIEnv *, jclass, const char *,
    404447                                            const char *);
    405448
    406   jobject  (*GetObjectField)               (JNIEnv *, jobject, jfieldID);
    407   jboolean (*GetBooleanField)              (JNIEnv *, jobject, jfieldID);
    408   jbyte    (*GetByteField)                 (JNIEnv *, jobject, jfieldID);
    409   jchar    (*GetCharField)                 (JNIEnv *, jobject, jfieldID);
    410   jshort   (*GetShortField)                (JNIEnv *, jobject, jfieldID);
    411   jint     (*GetIntField)                  (JNIEnv *, jobject, jfieldID);
    412   jlong    (*GetLongField)                 (JNIEnv *, jobject, jfieldID);
    413   jfloat   (*GetFloatField)                (JNIEnv *, jobject, jfieldID);
    414   jdouble  (*GetDoubleField)               (JNIEnv *, jobject, jfieldID);
    415 
    416   void          (*SetObjectField)          (JNIEnv *, jobject,
     449  jobject  (JNICALL *CallStaticObjectMethod)  (JNIEnv *, jclass, jmethodID,
     450                                               ...);
     451  jobject  (JNICALL *CallStaticObjectMethodV) (JNIEnv *, jclass, jmethodID,
     452                                               _Jv_va_list);
     453  jobject  (JNICALL *CallStaticObjectMethodA) (JNIEnv *, jclass, jmethodID,
     454                                               jvalue *);
     455  jboolean (JNICALL *CallStaticBooleanMethod) (JNIEnv *, jclass, jmethodID,
     456                                               ...);
     457  jboolean (JNICALL *CallStaticBooleanMethodV) (JNIEnv *, jclass, jmethodID,
     458                                                _Jv_va_list);
     459  jboolean (JNICALL *CallStaticBooleanMethodA) (JNIEnv *, jclass, jmethodID,
     460                                                jvalue *);
     461  jbyte    (JNICALL *CallStaticByteMethod)    (JNIEnv *, jclass, jmethodID,
     462                                               ...);
     463  jbyte    (JNICALL *CallStaticByteMethodV)   (JNIEnv *, jclass, jmethodID,
     464                                               _Jv_va_list);
     465  jbyte    (JNICALL *CallStaticByteMethodA)   (JNIEnv *, jclass, jmethodID,
     466                                               jvalue *);
     467  jchar    (JNICALL *CallStaticCharMethod)    (JNIEnv *, jclass, jmethodID,
     468                                               ...);
     469  jchar    (JNICALL *CallStaticCharMethodV)   (JNIEnv *, jclass, jmethodID,
     470                                               _Jv_va_list);
     471  jchar    (JNICALL *CallStaticCharMethodA)   (JNIEnv *, jclass, jmethodID,
     472                                               jvalue *);
     473  jshort   (JNICALL *CallStaticShortMethod)   (JNIEnv *, jclass, jmethodID,
     474                                               ...);
     475  jshort   (JNICALL *CallStaticShortMethodV)  (JNIEnv *, jclass, jmethodID,
     476                                               _Jv_va_list);
     477  jshort   (JNICALL *CallStaticShortMethodA)  (JNIEnv *, jclass, jmethodID,
     478                                               jvalue *);
     479  jint     (JNICALL *CallStaticIntMethod)     (JNIEnv *, jclass, jmethodID,
     480                                               ...);
     481  jint     (JNICALL *CallStaticIntMethodV)    (JNIEnv *, jclass, jmethodID,
     482                                               _Jv_va_list);
     483  jint     (JNICALL *CallStaticIntMethodA)    (JNIEnv *, jclass, jmethodID,
     484                                               jvalue *);
     485  jlong    (JNICALL *CallStaticLongMethod)    (JNIEnv *, jclass, jmethodID,
     486                                               ...);
     487  jlong    (JNICALL *CallStaticLongMethodV)   (JNIEnv *, jclass, jmethodID,
     488                                               _Jv_va_list);
     489  jlong    (JNICALL *CallStaticLongMethodA)   (JNIEnv *, jclass, jmethodID,
     490                                               jvalue *);
     491  jfloat   (JNICALL *CallStaticFloatMethod)   (JNIEnv *, jclass, jmethodID,
     492                                               ...);
     493  jfloat   (JNICALL *CallStaticFloatMethodV)  (JNIEnv *, jclass, jmethodID,
     494                                               _Jv_va_list);
     495  jfloat   (JNICALL *CallStaticFloatMethodA)  (JNIEnv *, jclass, jmethodID,
     496                                               jvalue *);
     497  jdouble  (JNICALL *CallStaticDoubleMethod)  (JNIEnv *, jclass, jmethodID,
     498                                               ...);
     499  jdouble  (JNICALL *CallStaticDoubleMethodV) (JNIEnv *, jclass, jmethodID,
     500                                               _Jv_va_list);
     501  jdouble  (JNICALL *CallStaticDoubleMethodA) (JNIEnv *, jclass, jmethodID,
     502                                               jvalue *);
     503  void     (JNICALL *CallStaticVoidMethod)    (JNIEnv *, jclass, jmethodID,
     504                                               ...);
     505  void     (JNICALL *CallStaticVoidMethodV)   (JNIEnv *, jclass, jmethodID,
     506                                               _Jv_va_list);
     507  void     (JNICALL *CallStaticVoidMethodA)   (JNIEnv *, jclass, jmethodID,
     508                                               jvalue *);
     509
     510  jfieldID (JNICALL *GetStaticFieldID)        (JNIEnv *, jclass, const char *,
     511                                               const char *);
     512
     513  jobject  (JNICALL *GetStaticObjectField)    (JNIEnv *, jclass, jfieldID);
     514  jboolean (JNICALL *GetStaticBooleanField)   (JNIEnv *, jclass, jfieldID);
     515  jbyte    (JNICALL *GetStaticByteField)      (JNIEnv *, jclass, jfieldID);
     516  jchar    (JNICALL *GetStaticCharField)      (JNIEnv *, jclass, jfieldID);
     517  jshort   (JNICALL *GetStaticShortField)     (JNIEnv *, jclass, jfieldID);
     518  jint     (JNICALL *GetStaticIntField)       (JNIEnv *, jclass, jfieldID);
     519  jlong    (JNICALL *GetStaticLongField)      (JNIEnv *, jclass, jfieldID);
     520  jfloat   (JNICALL *GetStaticFloatField)     (JNIEnv *, jclass, jfieldID);
     521  jdouble  (JNICALL *GetStaticDoubleField)    (JNIEnv *, jclass, jfieldID);
     522
     523  void  (JNICALL *SetStaticObjectField)    (JNIEnv *, jclass,
    417524                                            jfieldID, jobject);
    418   void          (*SetBooleanField)         (JNIEnv *, jobject,
     525  void  (JNICALL *SetStaticBooleanField)   (JNIEnv *, jclass,
    419526                                            jfieldID, jboolean);
    420   void          (*SetByteField)            (JNIEnv *, jobject,
     527  void  (JNICALL *SetStaticByteField)      (JNIEnv *, jclass,
    421528                                            jfieldID, jbyte);
    422   void          (*SetCharField)            (JNIEnv *, jobject,
     529  void  (JNICALL *SetStaticCharField)      (JNIEnv *, jclass,
    423530                                            jfieldID, jchar);
    424   void          (*SetShortField)           (JNIEnv *, jobject,
     531  void  (JNICALL *SetStaticShortField)     (JNIEnv *, jclass,
    425532                                            jfieldID, jshort);
    426   void          (*SetIntField)             (JNIEnv *, jobject,
     533  void  (JNICALL *SetStaticIntField)       (JNIEnv *, jclass,
    427534                                            jfieldID, jint);
    428   void          (*SetLongField)            (JNIEnv *, jobject,
     535  void  (JNICALL *SetStaticLongField)      (JNIEnv *, jclass,
    429536                                            jfieldID, jlong);
    430   void          (*SetFloatField)           (JNIEnv *, jobject,
     537  void  (JNICALL *SetStaticFloatField)     (JNIEnv *, jclass,
    431538                                            jfieldID, jfloat);
    432   void          (*SetDoubleField)          (JNIEnv *, jobject,
     539  void  (JNICALL *SetStaticDoubleField)    (JNIEnv *, jclass,
    433540                                            jfieldID, jdouble);
    434541
    435   jmethodID (*GetStaticMethodID)           (JNIEnv *, jclass, const char *,
    436                                             const char *);
    437 
    438   jobject       (*CallStaticObjectMethod)  (JNIEnv *, jclass, jmethodID,
    439                                             ...);
    440   jobject       (*CallStaticObjectMethodV) (JNIEnv *, jclass, jmethodID,
    441                                             _Jv_va_list);
    442   jobject       (*CallStaticObjectMethodA) (JNIEnv *, jclass, jmethodID,
    443                                             jvalue *);
    444   jboolean      (*CallStaticBooleanMethod) (JNIEnv *, jclass, jmethodID,
    445                                             ...);
    446   jboolean      (*CallStaticBooleanMethodV) (JNIEnv *, jclass, jmethodID,
    447                                              _Jv_va_list);
    448   jboolean      (*CallStaticBooleanMethodA) (JNIEnv *, jclass, jmethodID,
    449                                              jvalue *);
    450   jbyte         (*CallStaticByteMethod)    (JNIEnv *, jclass, jmethodID,
    451                                             ...);
    452   jbyte         (*CallStaticByteMethodV)   (JNIEnv *, jclass, jmethodID,
    453                                             _Jv_va_list);
    454   jbyte         (*CallStaticByteMethodA)   (JNIEnv *, jclass, jmethodID,
    455                                             jvalue *);
    456   jchar         (*CallStaticCharMethod)    (JNIEnv *, jclass, jmethodID,
    457                                             ...);
    458   jchar         (*CallStaticCharMethodV)   (JNIEnv *, jclass, jmethodID,
    459                                             _Jv_va_list);
    460   jchar         (*CallStaticCharMethodA)   (JNIEnv *, jclass, jmethodID,
    461                                             jvalue *);
    462   jshort        (*CallStaticShortMethod)   (JNIEnv *, jclass, jmethodID,
    463                                             ...);
    464   jshort        (*CallStaticShortMethodV)  (JNIEnv *, jclass, jmethodID,
    465                                             _Jv_va_list);
    466   jshort        (*CallStaticShortMethodA)  (JNIEnv *, jclass, jmethodID,
    467                                             jvalue *);
    468   jint          (*CallStaticIntMethod)     (JNIEnv *, jclass, jmethodID,
    469                                             ...);
    470   jint          (*CallStaticIntMethodV)    (JNIEnv *, jclass, jmethodID,
    471                                             _Jv_va_list);
    472   jint          (*CallStaticIntMethodA)    (JNIEnv *, jclass, jmethodID,
    473                                             jvalue *);
    474   jlong         (*CallStaticLongMethod)    (JNIEnv *, jclass, jmethodID,
    475                                             ...);
    476   jlong         (*CallStaticLongMethodV)   (JNIEnv *, jclass, jmethodID,
    477                                             _Jv_va_list);
    478   jlong         (*CallStaticLongMethodA)   (JNIEnv *, jclass, jmethodID,
    479                                             jvalue *);
    480   jfloat        (*CallStaticFloatMethod)   (JNIEnv *, jclass, jmethodID,
    481                                             ...);
    482   jfloat        (*CallStaticFloatMethodV)  (JNIEnv *, jclass, jmethodID,
    483                                             _Jv_va_list);
    484   jfloat        (*CallStaticFloatMethodA)  (JNIEnv *, jclass, jmethodID,
    485                                             jvalue *);
    486   jdouble       (*CallStaticDoubleMethod)  (JNIEnv *, jclass, jmethodID,
    487                                             ...);
    488   jdouble       (*CallStaticDoubleMethodV) (JNIEnv *, jclass, jmethodID,
    489                                             _Jv_va_list);
    490   jdouble       (*CallStaticDoubleMethodA) (JNIEnv *, jclass, jmethodID,
    491                                             jvalue *);
    492   void          (*CallStaticVoidMethod)    (JNIEnv *, jclass, jmethodID,
    493                                             ...);
    494   void          (*CallStaticVoidMethodV)   (JNIEnv *, jclass, jmethodID,
    495                                             _Jv_va_list);
    496   void          (*CallStaticVoidMethodA)   (JNIEnv *, jclass, jmethodID,
    497                                             jvalue *);
    498 
    499   jfieldID      (*GetStaticFieldID)        (JNIEnv *, jclass, const char *,
    500                                             const char *);
    501 
    502   jobject       (*GetStaticObjectField)    (JNIEnv *, jclass, jfieldID);
    503   jboolean      (*GetStaticBooleanField)   (JNIEnv *, jclass, jfieldID);
    504   jbyte         (*GetStaticByteField)      (JNIEnv *, jclass, jfieldID);
    505   jchar         (*GetStaticCharField)      (JNIEnv *, jclass, jfieldID);
    506   jshort        (*GetStaticShortField)     (JNIEnv *, jclass, jfieldID);
    507   jint          (*GetStaticIntField)       (JNIEnv *, jclass, jfieldID);
    508   jlong         (*GetStaticLongField)      (JNIEnv *, jclass, jfieldID);
    509   jfloat        (*GetStaticFloatField)     (JNIEnv *, jclass, jfieldID);
    510   jdouble       (*GetStaticDoubleField)    (JNIEnv *, jclass, jfieldID);
    511 
    512   void          (*SetStaticObjectField)    (JNIEnv *, jclass,
    513                                             jfieldID, jobject);
    514   void          (*SetStaticBooleanField)   (JNIEnv *, jclass,
    515                                             jfieldID, jboolean);
    516   void          (*SetStaticByteField)      (JNIEnv *, jclass,
    517                                             jfieldID, jbyte);
    518   void          (*SetStaticCharField)      (JNIEnv *, jclass,
    519                                             jfieldID, jchar);
    520   void          (*SetStaticShortField)     (JNIEnv *, jclass,
    521                                             jfieldID, jshort);
    522   void          (*SetStaticIntField)       (JNIEnv *, jclass,
    523                                             jfieldID, jint);
    524   void          (*SetStaticLongField)      (JNIEnv *, jclass,
    525                                             jfieldID, jlong);
    526   void          (*SetStaticFloatField)     (JNIEnv *, jclass,
    527                                             jfieldID, jfloat);
    528   void          (*SetStaticDoubleField)    (JNIEnv *, jclass,
    529                                             jfieldID, jdouble);
    530 
    531   jstring  (*NewString)                    (JNIEnv *, const jchar *, jsize);
    532   jsize    (*GetStringLength)              (JNIEnv *, jstring);
    533   const jchar * (*GetStringChars)          (JNIEnv *, jstring, jboolean *);
    534   void     (*ReleaseStringChars)           (JNIEnv *, jstring, const jchar *);
    535   jstring  (*NewStringUTF)                 (JNIEnv *, const char *);
    536   jsize    (*GetStringUTFLength)           (JNIEnv *, jstring);
    537   const char * (*GetStringUTFChars)        (JNIEnv *, jstring, jboolean *);
    538   void     (*ReleaseStringUTFChars)        (JNIEnv *, jstring, const char *);
    539   jsize    (*GetArrayLength)               (JNIEnv *, jarray);
    540   jarray   (*NewObjectArray)               (JNIEnv *, jsize, jclass, jobject);
    541   jobject  (*GetObjectArrayElement)        (JNIEnv *, jobjectArray, jsize);
    542   void     (*SetObjectArrayElement)        (JNIEnv *, jobjectArray, jsize,
    543                                             jobject);
    544 
    545   jbooleanArray (*NewBooleanArray)         (JNIEnv *, jsize);
    546   jbyteArray    (*NewByteArray)            (JNIEnv *, jsize);
    547   jcharArray    (*NewCharArray)            (JNIEnv *, jsize);
    548   jshortArray   (*NewShortArray)           (JNIEnv *, jsize);
    549   jintArray     (*NewIntArray)             (JNIEnv *, jsize);
    550   jlongArray    (*NewLongArray)            (JNIEnv *, jsize);
    551   jfloatArray   (*NewFloatArray)           (JNIEnv *, jsize);
    552   jdoubleArray  (*NewDoubleArray)          (JNIEnv *, jsize);
    553 
    554   jboolean *    (*GetBooleanArrayElements) (JNIEnv *, jbooleanArray,
    555                                             jboolean *);
    556   jbyte *       (*GetByteArrayElements)    (JNIEnv *, jbyteArray,
    557                                             jboolean *);
    558   jchar *       (*GetCharArrayElements)    (JNIEnv *, jcharArray,
    559                                             jboolean *);
    560   jshort *      (*GetShortArrayElements)   (JNIEnv *, jshortArray,
    561                                             jboolean *);
    562   jint *        (*GetIntArrayElements)     (JNIEnv *, jintArray,
    563                                             jboolean *);
    564   jlong *       (*GetLongArrayElements)    (JNIEnv *, jlongArray,
    565                                             jboolean *);
    566   jfloat *      (*GetFloatArrayElements)   (JNIEnv *, jfloatArray,
    567                                             jboolean *);
    568   jdouble *     (*GetDoubleArrayElements)  (JNIEnv *, jdoubleArray,
    569                                             jboolean *);
    570 
    571   void          (*ReleaseBooleanArrayElements) (JNIEnv *, jbooleanArray,
    572                                                 jboolean *, jint);
    573   void          (*ReleaseByteArrayElements)    (JNIEnv *, jbyteArray,
    574                                                 jbyte *, jint);
    575   void          (*ReleaseCharArrayElements)    (JNIEnv *, jcharArray,
    576                                                 jchar *, jint);
    577   void          (*ReleaseShortArrayElements)   (JNIEnv *, jshortArray,
    578                                                 jshort *, jint);
    579   void          (*ReleaseIntArrayElements)     (JNIEnv *, jintArray,
    580                                                 jint *, jint);
    581   void          (*ReleaseLongArrayElements)    (JNIEnv *, jlongArray,
    582                                                 jlong *, jint);
    583   void          (*ReleaseFloatArrayElements)   (JNIEnv *, jfloatArray,
    584                                                 jfloat *, jint);
    585   void          (*ReleaseDoubleArrayElements)  (JNIEnv *, jdoubleArray,
    586                                                 jdouble *, jint);
    587 
    588   void          (*GetBooleanArrayRegion)   (JNIEnv *, jbooleanArray,
    589                                             jsize, jsize, jboolean *);
    590   void          (*GetByteArrayRegion)      (JNIEnv *, jbyteArray,
    591                                             jsize, jsize, jbyte *);
    592   void          (*GetCharArrayRegion)      (JNIEnv *, jcharArray,
    593                                             jsize, jsize, jchar *);
    594   void          (*GetShortArrayRegion)     (JNIEnv *, jshortArray,
    595                                             jsize, jsize, jshort *);
    596   void          (*GetIntArrayRegion)       (JNIEnv *, jintArray,
    597                                             jsize, jsize, jint *);
    598   void          (*GetLongArrayRegion)      (JNIEnv *, jlongArray,
    599                                             jsize, jsize, jlong *);
    600   void          (*GetFloatArrayRegion)     (JNIEnv *, jfloatArray,
    601                                             jsize, jsize, jfloat *);
    602   void          (*GetDoubleArrayRegion)    (JNIEnv *, jdoubleArray,
    603                                             jsize, jsize, jdouble *);
    604 
    605   void          (*SetBooleanArrayRegion)   (JNIEnv *, jbooleanArray,
    606                                             jsize, jsize, jboolean *);
    607   void          (*SetByteArrayRegion)      (JNIEnv *, jbyteArray,
    608                                             jsize, jsize, jbyte *);
    609   void          (*SetCharArrayRegion)      (JNIEnv *, jcharArray,
    610                                             jsize, jsize, jchar *);
    611   void          (*SetShortArrayRegion)     (JNIEnv *, jshortArray,
    612                                             jsize, jsize, jshort *);
    613   void          (*SetIntArrayRegion)       (JNIEnv *, jintArray,
    614                                             jsize, jsize, jint *);
    615   void          (*SetLongArrayRegion)      (JNIEnv *, jlongArray,
    616                                             jsize, jsize, jlong *);
    617   void          (*SetFloatArrayRegion)     (JNIEnv *, jfloatArray,
    618                                             jsize, jsize, jfloat *);
    619   void          (*SetDoubleArrayRegion)    (JNIEnv *, jdoubleArray,
    620                                             jsize, jsize, jdouble *);
    621 
    622   jint     (*RegisterNatives)              (JNIEnv *, jclass,
    623                                             const JNINativeMethod *, jint);
    624   jint     (*UnregisterNatives)            (JNIEnv *, jclass);
    625   jint     (*MonitorEnter)                 (JNIEnv *, jobject);
    626   jint     (*MonitorExit)                  (JNIEnv *, jobject);
    627   jint     (*GetJavaVM)                    (JNIEnv *, JavaVM **);
    628 
    629   void     (*GetStringRegion)              (JNIEnv *, jstring, jsize,
    630                                             jsize, jchar *);
    631   void     (*GetStringUTFRegion)           (JNIEnv *, jstring, jsize,
    632                                             jsize, char *);
    633 
    634   void * (*GetPrimitiveArrayCritical)      (JNIEnv *, jarray, jboolean *);
    635   void   (*ReleasePrimitiveArrayCritical)  (JNIEnv *, jarray, void *, jint);
    636 
    637   const jchar * (*GetStringCritical)       (JNIEnv *, jstring, jboolean *);
    638   void          (*ReleaseStringCritical)   (JNIEnv *, jstring, const jchar *);
    639 
    640   jweak  (*NewWeakGlobalRef)               (JNIEnv *, jobject);
    641   void   (*DeleteWeakGlobalRef)            (JNIEnv *, jweak);
    642 
    643   jboolean      (*ExceptionCheck)          (JNIEnv *);
     542  jstring  (JNICALL *NewString)            (JNIEnv *, const jchar *, jsize);
     543  jsize    (JNICALL *GetStringLength)      (JNIEnv *, jstring);
     544  const jchar * (JNICALL *GetStringChars)  (JNIEnv *, jstring, jboolean *);
     545  void     (JNICALL *ReleaseStringChars)   (JNIEnv *, jstring, const jchar *);
     546  jstring  (JNICALL *NewStringUTF)         (JNIEnv *, const char *);
     547  jsize    (JNICALL *GetStringUTFLength)   (JNIEnv *, jstring);
     548  const char * (JNICALL *GetStringUTFChars) (JNIEnv *, jstring, jboolean *);
     549  void     (JNICALL *ReleaseStringUTFChars) (JNIEnv *, jstring, const char *);
     550  jsize    (JNICALL *GetArrayLength)       (JNIEnv *, jarray);
     551  jarray   (JNICALL *NewObjectArray)       (JNIEnv *, jsize, jclass, jobject);
     552  jobject  (JNICALL *GetObjectArrayElement) (JNIEnv *, jobjectArray, jsize);
     553  void     (JNICALL *SetObjectArrayElement) (JNIEnv *, jobjectArray, jsize,
     554                                             jobject);
     555
     556  jbooleanArray (JNICALL *NewBooleanArray)         (JNIEnv *, jsize);
     557  jbyteArray    (JNICALL *NewByteArray)            (JNIEnv *, jsize);
     558  jcharArray    (JNICALL *NewCharArray)            (JNIEnv *, jsize);
     559  jshortArray   (JNICALL *NewShortArray)           (JNIEnv *, jsize);
     560  jintArray     (JNICALL *NewIntArray)             (JNIEnv *, jsize);
     561  jlongArray    (JNICALL *NewLongArray)            (JNIEnv *, jsize);
     562  jfloatArray   (JNICALL *NewFloatArray)           (JNIEnv *, jsize);
     563  jdoubleArray  (JNICALL *NewDoubleArray)          (JNIEnv *, jsize);
     564
     565  jboolean *    (JNICALL *GetBooleanArrayElements) (JNIEnv *, jbooleanArray,
     566                                                    jboolean *);
     567  jbyte *       (JNICALL *GetByteArrayElements)    (JNIEnv *, jbyteArray,
     568                                                    jboolean *);
     569  jchar *       (JNICALL *GetCharArrayElements)    (JNIEnv *, jcharArray,
     570                                                    jboolean *);
     571  jshort *      (JNICALL *GetShortArrayElements)   (JNIEnv *, jshortArray,
     572                                                    jboolean *);
     573  jint *        (JNICALL *GetIntArrayElements)     (JNIEnv *, jintArray,
     574                                                    jboolean *);
     575  jlong *       (JNICALL *GetLongArrayElements)    (JNIEnv *, jlongArray,
     576                                                    jboolean *);
     577  jfloat *      (JNICALL *GetFloatArrayElements)   (JNIEnv *, jfloatArray,
     578                                                    jboolean *);
     579  jdouble *     (JNICALL *GetDoubleArrayElements)  (JNIEnv *, jdoubleArray,
     580                                                    jboolean *);
     581
     582  void          (JNICALL *ReleaseBooleanArrayElements) (JNIEnv *, jbooleanArray,
     583                                                        jboolean *, jint);
     584  void          (JNICALL *ReleaseByteArrayElements)    (JNIEnv *, jbyteArray,
     585                                                        jbyte *, jint);
     586  void          (JNICALL *ReleaseCharArrayElements)    (JNIEnv *, jcharArray,
     587                                                        jchar *, jint);
     588  void          (JNICALL *ReleaseShortArrayElements)   (JNIEnv *, jshortArray,
     589                                                        jshort *, jint);
     590  void          (JNICALL *ReleaseIntArrayElements)     (JNIEnv *, jintArray,
     591                                                        jint *, jint);
     592  void          (JNICALL *ReleaseLongArrayElements)    (JNIEnv *, jlongArray,
     593                                                        jlong *, jint);
     594  void          (JNICALL *ReleaseFloatArrayElements)   (JNIEnv *, jfloatArray,
     595                                                        jfloat *, jint);
     596  void          (JNICALL *ReleaseDoubleArrayElements)  (JNIEnv *, jdoubleArray,
     597                                                        jdouble *, jint);
     598
     599  void          (JNICALL *GetBooleanArrayRegion)   (JNIEnv *, jbooleanArray,
     600                                                    jsize, jsize, jboolean *);
     601  void          (JNICALL *GetByteArrayRegion)      (JNIEnv *, jbyteArray,
     602                                                    jsize, jsize, jbyte *);
     603  void          (JNICALL *GetCharArrayRegion)      (JNIEnv *, jcharArray,
     604                                                    jsize, jsize, jchar *);
     605  void          (JNICALL *GetShortArrayRegion)     (JNIEnv *, jshortArray,
     606                                                    jsize, jsize, jshort *);
     607  void          (JNICALL *GetIntArrayRegion)       (JNIEnv *, jintArray,
     608                                                    jsize, jsize, jint *);
     609  void          (JNICALL *GetLongArrayRegion)      (JNIEnv *, jlongArray,
     610                                                    jsize, jsize, jlong *);
     611  void          (JNICALL *GetFloatArrayRegion)     (JNIEnv *, jfloatArray,
     612                                                    jsize, jsize, jfloat *);
     613  void          (JNICALL *GetDoubleArrayRegion)    (JNIEnv *, jdoubleArray,
     614                                                    jsize, jsize, jdouble *);
     615
     616  void          (JNICALL *SetBooleanArrayRegion)   (JNIEnv *, jbooleanArray,
     617                                                    jsize, jsize, jboolean *);
     618  void          (JNICALL *SetByteArrayRegion)      (JNIEnv *, jbyteArray,
     619                                                    jsize, jsize, jbyte *);
     620  void          (JNICALL *SetCharArrayRegion)      (JNIEnv *, jcharArray,
     621                                                    jsize, jsize, jchar *);
     622  void          (JNICALL *SetShortArrayRegion)     (JNIEnv *, jshortArray,
     623                                                    jsize, jsize, jshort *);
     624  void          (JNICALL *SetIntArrayRegion)       (JNIEnv *, jintArray,
     625                                                    jsize, jsize, jint *);
     626  void          (JNICALL *SetLongArrayRegion)      (JNIEnv *, jlongArray,
     627                                                    jsize, jsize, jlong *);
     628  void          (JNICALL *SetFloatArrayRegion)     (JNIEnv *, jfloatArray,
     629                                                    jsize, jsize, jfloat *);
     630  void          (JNICALL *SetDoubleArrayRegion)    (JNIEnv *, jdoubleArray,
     631                                                    jsize, jsize, jdouble *);
     632
     633  jint     (JNICALL *RegisterNatives)              (JNIEnv *, jclass,
     634                                                    const JNINativeMethod *,
     635                                                    jint);
     636  jint     (JNICALL *UnregisterNatives)            (JNIEnv *, jclass);
     637  jint     (JNICALL *MonitorEnter)                 (JNIEnv *, jobject);
     638  jint     (JNICALL *MonitorExit)                  (JNIEnv *, jobject);
     639  jint     (JNICALL *GetJavaVM)                    (JNIEnv *, JavaVM **);
     640
     641  void     (JNICALL *GetStringRegion)              (JNIEnv *, jstring, jsize,
     642                                                    jsize, jchar *);
     643  void     (JNICALL *GetStringUTFRegion)           (JNIEnv *, jstring, jsize,
     644                                                    jsize, char *);
     645
     646  void * (JNICALL *GetPrimitiveArrayCritical)      (JNIEnv *, jarray,
     647                                                    jboolean *);
     648  void   (JNICALL *ReleasePrimitiveArrayCritical)  (JNIEnv *, jarray, void *,
     649                                                    jint);
     650
     651  const jchar * (JNICALL *GetStringCritical)       (JNIEnv *, jstring,
     652                                                    jboolean *);
     653  void          (JNICALL *ReleaseStringCritical)   (JNIEnv *, jstring,
     654                                                    const jchar *);
     655
     656  jweak  (JNICALL *NewWeakGlobalRef)               (JNIEnv *, jobject);
     657  void   (JNICALL *DeleteWeakGlobalRef)            (JNIEnv *, jweak);
     658
     659  jboolean      (JNICALL *ExceptionCheck)          (JNIEnv *);
     660
     661  jobject (JNICALL *NewDirectByteBuffer)           (JNIEnv *, void *, jlong);
     662  void *  (JNICALL *GetDirectBufferAddress)        (JNIEnv *, jobject);
     663  jlong   (JNICALL *GetDirectBufferCapacity)       (JNIEnv *, jobject);
    644664};
    645665
     
    669689  { return p->GetVersion (this); }
    670690
    671   jclass DefineClass (jobject obj0, const jbyte * val1, jsize val2)
    672   { return p->DefineClass (this, obj0, val1, val2); }
     691  jclass DefineClass (const char *name, jobject obj0, const jbyte * val1,
     692                      jsize val2)
     693  { return p->DefineClass (this, name, obj0, val1, val2); }
    673694
    674695  jclass FindClass (const char * val0)
     
    15231544  jboolean ExceptionCheck ()
    15241545  { return p->ExceptionCheck (this); }
     1546
     1547  jobject NewDirectByteBuffer (void *addr, jlong capacity)
     1548  { return p->NewDirectByteBuffer (this, addr, capacity); }
     1549
     1550  void *GetDirectBufferAddress (jobject buf)
     1551  { return p->GetDirectBufferAddress (this, buf); }
     1552
     1553  jlong GetDirectBufferCapacity (jobject buf)
     1554  { return p->GetDirectBufferCapacity (this, buf); }
    15251555};
    15261556#endif /* __cplusplus */
     
    15361566  _Jv_func reserved2;
    15371567
    1538   jint (*DestroyJavaVM)         (JavaVM *);
    1539   jint (*AttachCurrentThread)   (JavaVM *, void **, void *);
    1540   jint (*DetachCurrentThread)   (JavaVM *);
    1541   jint (*GetEnv)                (JavaVM *, void **, jint);
     1568  jint (JNICALL *DestroyJavaVM)         (JavaVM *);
     1569  jint (JNICALL *AttachCurrentThread)   (JavaVM *, void **, void *);
     1570  jint (JNICALL *DetachCurrentThread)   (JavaVM *);
     1571  jint (JNICALL *GetEnv)                (JavaVM *, void **, jint);
     1572  jint (JNICALL *AttachCurrentThreadAsDaemon) (JavaVM *, void **, void *);
    15421573};
    15431574
     
    15641595  jint GetEnv (void **penv, jint version)
    15651596  { return functions->GetEnv (this, penv, version); }
     1597
     1598  jint AttachCurrentThreadAsDaemon (void **penv, void *args)
     1599  { return functions->AttachCurrentThreadAsDaemon (this, penv, args); }
    15661600};
    15671601#endif /* __cplusplus */
  • branches/GNU/src/gcc/libjava/include/jvm.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    111111  jdouble d;
    112112};                             
     113
     114// An instance of this type is used to represent a single frame in a
     115// backtrace.  If the interpreter has been built, we also include
     116// information about the interpreted method.
     117struct _Jv_frame_info
     118{
     119  // PC value.
     120  void *addr;
     121#ifdef INTERPRETER
     122  // Actually a _Jv_InterpMethod, but we don't want to include
     123  // java-interp.h everywhere.
     124  void *interp;
     125#endif // INTERPRETER
     126};
    113127
    114128/* Extract a character from a Java-style Utf8 string.
     
    339353}
    340354
    341 /* get/set the name of the running executable. */
    342 extern char *_Jv_ThisExecutable (void);
    343 extern void _Jv_ThisExecutable (const char *);
     355/* Get the number of arguments (cf. argc) or 0 if our argument
     356   list was never initialized.  */
     357extern int _Jv_GetNbArgs (void);
     358
     359/* Get the specified argument (cf. argv[index]) or "" if either
     360   our argument list was never initialized or the specified index
     361   is out of bounds.  */
     362extern const char * _Jv_GetSafeArg (int index);
     363
     364/* Sets our argument list. Can be used by programs with non-standard
     365   entry points.  */
     366extern void _Jv_SetArgs (int argc, const char **argv);
     367
     368/* Get the name of the running executable.  */
     369extern const char *_Jv_ThisExecutable (void);
    344370
    345371/* Return a pointer to a symbol in executable or loaded library.  */
  • branches/GNU/src/gcc/libjava/include/posix-threads.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    257257_Jv_ThreadSelf (void)
    258258{
    259   unsigned long id;
    260   __asm__ ("call_pal %1\n\tmov $0, %0" : "=r"(id) : "i"(PAL_rduniq) : "$0");
     259  register unsigned long id __asm__("$0");
     260  __asm__ ("call_pal %1" : "=r"(id) : "i"(PAL_rduniq));
    261261  return id;
    262262}
  • branches/GNU/src/gcc/libjava/include/posix.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11// posix.h -- Helper functions for POSIX-flavored OSs.
    22
    3 /* Copyright (C) 2000, 2002  Free Software Foundation
     3/* Copyright (C) 2000, 2002, 2003  Free Software Foundation
    44
    55   This file is part of libgcj.
     
    88Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
    99details.  */
     10
     11#ifndef __JV_POSIX_H__
     12#define __JV_POSIX_H__
    1013
    1114/* Required on Tru64 UNIX V4/V5 so <sys/socket.h> defines prototypes of
     
    2528#endif
    2629
     30#ifdef HAVE_SYS_SOCKET_H
     31#include <sys/socket.h>
     32#endif
     33
    2734#ifdef HAVE_UNISTD_H
    2835#include <unistd.h>
     
    3340#include <gcj/cni.h>
    3441#include <java/util/Properties.h>
     42
     43// Prefix and suffix for shared libraries.
     44#define _Jv_platform_solib_prefix "lib"
     45#define _Jv_platform_solib_suffix ".so"
     46
     47#ifndef DISABLE_JAVA_NET
     48#include <java/net/InetAddress.h>
     49#endif
    3550
    3651extern int _Jv_select (int n, fd_set *, fd_set *, fd_set *, struct timeval *);
     
    4358{
    4459  // Ignore errors.
    45   fcntl (fd, F_SETFD, FD_CLOEXEC);
     60  ::fcntl (fd, F_SETFD, FD_CLOEXEC);
    4661}
     62
     63#undef fcntl
     64
     65#ifdef JV_HASH_SYNCHRONIZATION
     66inline void
     67_Jv_platform_usleep (unsigned long usecs)
     68{
     69  usleep (usecs);
     70}
     71#endif /* JV_HASH_SYNCHRONIZATION */
     72
     73#ifndef DISABLE_JAVA_NET
     74
     75#ifndef HAVE_SOCKLEN_T
     76#define socklen_t int
     77#endif
     78
     79static inline int
     80_Jv_socket (int domain, int type, int protocol)
     81{
     82  return ::socket (domain, type, protocol);
     83}
     84
     85#undef socket
     86
     87inline int
     88_Jv_connect (jint fd, sockaddr *ptr, int len)
     89{
     90   return ::connect (fd, ptr, len);
     91}
     92
     93#undef connect
     94
     95inline int
     96_Jv_close (jint fd)
     97{
     98  return ::close (fd);
     99}
     100
     101#undef close
     102
     103// Avoid macro definitions of bind from system headers, e.g. on
     104// Solaris 7 with _XOPEN_SOURCE.  FIXME
     105inline int
     106_Jv_bind (int fd, struct sockaddr *addr, int addrlen)
     107{
     108  return ::bind (fd, addr, addrlen);
     109}
     110
     111#undef bind
     112
     113// Same problem with accept on Tru64 UNIX with _POSIX_PII_SOCKET
     114inline int
     115_Jv_accept (int fd, struct sockaddr *addr, socklen_t *addrlen)
     116{
     117  return ::accept (fd, addr, addrlen);
     118}
     119
     120#undef accept
     121
     122inline int
     123_Jv_listen (int fd, int backlog)
     124{
     125  return ::listen (fd, backlog);
     126}
     127
     128#undef listen
     129
     130inline int
     131_Jv_write(int s, void *buf, int len)
     132{
     133  return ::write (s, buf, len);
     134}
     135
     136#undef write
     137
     138inline int
     139_Jv_read(int s, void *buf, int len)
     140{
     141  return ::read (s, buf, len);
     142}
     143
     144#undef read
     145
     146#endif /* DISABLE_JAVA_NET */
     147
     148#endif /* __JV_POSIX_H__ */
  • branches/GNU/src/gcc/libjava/include/win32-threads.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    22// win32-threads.h - Defines for using Win32 threads.
    33
    4 /* Copyright (C) 1998, 1999, 2000  Free Software Foundation
     4/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software
     5   Foundation
    56
    67   This file is part of libgcj.
     
    1920//
    2021
    21 typedef struct _Jv_ConditionVariable_t {
     22typedef struct
     23{
     24  // ev[0] (signal) is a Win32 auto-reset event for _Jv_CondNotify
     25  // ev[1] (broadcast) is a Win32 manual-reset event for _Jv_CondNotifyAll
    2226  HANDLE ev[2];
     27
     28  // Number of threads waiting on this condition variable
     29  int blocked_count;
     30
     31  // Protects access to the blocked_count variable
    2332  CRITICAL_SECTION count_mutex;
    24   int blocked_count;
    25 };
    2633
    27 typedef CRITICAL_SECTION _Jv_Mutex_t;
     34} _Jv_ConditionVariable_t;
     35
     36typedef struct
     37{
     38  // The thread-id of the owner thread if any, 0 otherwise
     39  DWORD owner;
     40
     41  // Track nested mutex acquisitions by the same thread
     42  int refcount;
     43
     44  // The actual Windows construct used to implement this mutex
     45  CRITICAL_SECTION cs;
     46
     47} _Jv_Mutex_t;
    2848
    2949typedef struct
     
    3353  java::lang::Thread *thread_obj;
    3454} _Jv_Thread_t;
     55
     56typedef DWORD _Jv_ThreadId_t;
     57
     58inline _Jv_ThreadId_t
     59_Jv_ThreadSelf (void)
     60{
     61  return GetCurrentThreadId();
     62}
    3563
    3664typedef void _Jv_ThreadStartFunc (java::lang::Thread *);
     
    5381inline void _Jv_MutexInit (_Jv_Mutex_t *mu)
    5482{
    55   InitializeCriticalSection(mu);
     83  mu->owner = 0UL;
     84  mu->refcount = 0;
     85  InitializeCriticalSection (&(mu->cs));
    5686}
    5787
     
    5989inline void _Jv_MutexDestroy (_Jv_Mutex_t *mu)
    6090{
    61   DeleteCriticalSection(mu);
     91  mu->owner = 0UL;
     92  mu->refcount = 0;
     93  DeleteCriticalSection (&(mu->cs));
    6294  mu = NULL;
    6395}
     
    6597inline int _Jv_MutexUnlock (_Jv_Mutex_t *mu)
    6698{
    67   LeaveCriticalSection(mu);
    68   return 0;
     99  if (mu->owner == GetCurrentThreadId ( ))
     100    {
     101      mu->refcount--;
     102      if (mu->refcount == 0)
     103        mu->owner = 0UL;
     104      LeaveCriticalSection (&(mu->cs));
     105      return 0;
     106    }
     107  else
     108    return 1;
    69109}
    70110
    71111inline int _Jv_MutexLock (_Jv_Mutex_t *mu)
    72112{
    73   EnterCriticalSection(mu);
     113  EnterCriticalSection (&(mu->cs));
     114  mu->owner = GetCurrentThreadId ( );
     115  mu->refcount++;
    74116  return 0;
    75117}
     
    97139inline void _Jv_ThreadYield (void)
    98140{
    99   // FIXME: win98 freezes hard (OS hang) when we use this --
    100   //        for now, we simply don't yield
    101   // Sleep (0);
     141  Sleep (0);
    102142}
    103143
  • branches/GNU/src/gcc/libjava/include/win32.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11// win32.h -- Helper functions for Microsoft-flavored OSs.
    22
    3 /* Copyright (C) 2002  Free Software Foundation
     3/* Copyright (C) 2002, 2003  Free Software Foundation
    44
    55   This file is part of libgcj.
     
    1515#undef STRICT
    1616
    17 #undef __INSIDE_CYGWIN__
    18 #include <winsock.h>
     17#include <ws2tcpip.h>
    1918#include <gcj/cni.h>
    2019#include <java/util/Properties.h>
     20
     21#include <io.h>
     22
     23// Prefix and suffix for shared libraries.
     24#define _Jv_platform_solib_prefix ""
     25#define _Jv_platform_solib_suffix ".dll"
     26
     27#ifndef DISABLE_JAVA_NET
     28
     29// these errors cannot occur on Win32
     30#define ENOTCONN 0
     31#define ECONNRESET 0
     32
     33/* This is incorrect, but allows java/net/natPlainDatagramSocketImpl.cc
     34   to compile under MingW. This will be remedied in a subsequent gcj
     35   release where the Win32 and Posix networking code have been forked.  */
     36#define ECONNREFUSED 0
     37
     38#ifndef ENOPROTOOPT
     39#define ENOPROTOOPT 109
     40#endif
     41
     42#endif // DISABLE_JAVA_NET
    2143
    2244extern void _Jv_platform_initialize (void);
    2345extern void _Jv_platform_initProperties (java::util::Properties*);
    2446extern jlong _Jv_platform_gettimeofday ();
     47extern int _Jv_select (int n, fd_set *, fd_set *, fd_set *, struct timeval *);
    2548
    2649inline void
     
    3053}
    3154
    32 #define HAVE_BACKTRACE
     55#ifdef JV_HASH_SYNCHRONIZATION
     56/* Suspends the execution of the current thread for the specified
     57   number of microseconds.  Tries to emulate the behaviour of usleep()
     58   on UNIX and provides a granularity of 1 millisecond.  */
     59inline void
     60_Jv_platform_usleep (unsigned long usecs)
     61{
     62  if (usecs > 0UL)
     63    {
     64      unsigned long millis = ((usecs + 999UL) / 1000UL);
     65      Sleep (millis);
     66    }
     67}
     68#endif /* JV_HASH_SYNCHRONIZATION */
     69
     70#ifndef DISABLE_JAVA_NET
     71
     72static inline int
     73_Jv_socket (int domain, int type, int protocol)
     74{
     75  return ::socket (domain, type, protocol);
     76}
     77
     78inline int
     79_Jv_connect (jint fd, sockaddr *ptr, int len)
     80{
     81  return ::connect (fd, ptr, len);
     82}
     83
     84inline int
     85_Jv_close (jint fd)
     86{
     87  return ::closesocket (fd);
     88}
     89
     90inline int
     91_Jv_bind (int fd, struct sockaddr *addr, int addrlen)
     92{
     93  return ::bind (fd, addr, addrlen);
     94}
     95
     96inline int
     97_Jv_accept (int fd, struct sockaddr *addr, socklen_t *addrlen)
     98{
     99  return ::accept (fd, addr, addrlen);
     100}
     101
     102inline int
     103_Jv_listen (int fd, int backlog)
     104{
     105  return ::listen (fd, backlog);
     106}
     107
     108inline int
     109_Jv_write(int s, void *buf, int len)
     110{
     111  return ::send (s, (char*) buf, len, 0);
     112}
     113
     114inline int
     115_Jv_read(int s, void *buf, int len)
     116{
     117  return ::recv (s, (char*) buf, len, 0);
     118}
     119
     120#endif /* DISABLE_JAVA_NET */
    33121
    34122/* Store up to SIZE return address of the current program state in
Note: See TracChangeset for help on using the changeset viewer.