You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by dl...@apache.org on 2005/10/19 10:47:46 UTC
svn commit: r326483 - in
/incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/include:
jlClass.h jlObject.h jlString.h jlThread.h
Author: dlydick
Date: Wed Oct 19 01:47:31 2005
New Revision: 326483
URL: http://svn.apache.org/viewcvs?rev=326483&view=rev
Log:
Updated ARCH_xxx() macros for better diagnostic support.
Minor documentation adjustments.
Modified:
incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/include/jlClass.h
incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/include/jlObject.h
incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/include/jlString.h
incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/include/jlThread.h
Modified: incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/include/jlClass.h
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/include/jlClass.h?rev=326483&r1=326482&r2=326483&view=diff
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/include/jlClass.h (original)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/include/jlClass.h Wed Oct 19 01:47:31 2005
@@ -68,7 +68,9 @@
*
* @section Control
*
- * \$URL$ \$Id$
+ * \$URL$
+ *
+ * \$Id$
*
* Copyright 2005 The Apache Software Foundation
* or its licensors, as applicable.
@@ -92,6 +94,7 @@
* @date \$LastChangedDate$
*
* @author \$LastChangedBy$
+ *
* Original code contributed by Daniel Lydick on 09/28/2005.
*
* @section Reference
@@ -101,7 +104,9 @@
/**********************************************************************/
#ifdef JLCLASS_LOCAL_DEFINED
-ARCH_COPYRIGHT_APACHE(jlClass, h, "$URL$ $Id$");
+ARCH_HEADER_COPYRIGHT_APACHE(jlClass, h,
+"$URL$",
+"$Id$");
/**********************************************************************/
#else /* JLCLASS_LOCAL_DEFINED */
@@ -147,11 +152,13 @@
/*!
* @brief JNI hook to @link #jlClass_isArray() isArray()@endlink
+ *
*/
extern jboolean jlClass_isArray(jvm_object_hash objhash);
/*!
* @brief JNI hook to @link #jlClass_isPrimative() isPrimative()@endlink
+ *
*/
extern jboolean jlClass_isPrimative(jvm_object_hash objhash);
@@ -161,7 +168,9 @@
/*!
* @name Connection to local native method tables.
*
- * @brief These manifest constant code fragments are designed to be
+ * @brief Manifest constant code fragments.
+ *
+ * These code fragments are designed to be
* inserted directly into locations in
* @link jvm/src/native.c native.c@endlink without any other
* modification to that file except a @e single entry to actually
@@ -173,6 +182,7 @@
/*!
* @brief Complete list of local native method ordinals
* for @c @b java.lang.Class
+ *
*/
#define NATIVE_TABLE_JLCLASS \
case JLCLASS_NMO_ISARRAY: \
@@ -181,6 +191,7 @@
/*!
* @brief Table of local native methods and their descriptors
* for @c @b java.lang.Class
+ *
*/
#define NATIVE_TABLE_JLCLASS_ORDINALS \
{ \
@@ -202,6 +213,7 @@
/*!
* @brief @c @b (jint) local native method ordinal table
* for @c @b java.lang.Class
+ *
*/
#define NATIVE_TABLE_JLCLASS_JINT \
case JLCLASS_NMO_ISARRAY: \
Modified: incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/include/jlObject.h
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/include/jlObject.h?rev=326483&r1=326482&r2=326483&view=diff
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/include/jlObject.h (original)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/include/jlObject.h Wed Oct 19 01:47:31 2005
@@ -66,7 +66,9 @@
*
* @section Control
*
- * \$URL$ \$Id$
+ * \$URL$
+ *
+ * \$Id$
*
* Copyright 2005 The Apache Software Foundation
* or its licensors, as applicable.
@@ -90,6 +92,7 @@
* @date \$LastChangedDate$
*
* @author \$LastChangedBy$
+ *
* Original code contributed by Daniel Lydick on 09/28/2005.
*
* @section Reference
@@ -100,7 +103,9 @@
/**********************************************************************/
#ifdef JLOBJECT_LOCAL_DEFINED
-ARCH_COPYRIGHT_APACHE(jlObject, h, "$URL$ $Id$");
+ARCH_HEADER_COPYRIGHT_APACHE(jlObject, h,
+"$URL$",
+"$Id$");
/**********************************************************************/
#else /* JLOBJECT_LOCAL_DEFINED */
@@ -165,16 +170,16 @@
* @attention See comments about @c @b jobject and @c @b jclass in
* the local definition of @b jvm_class_index.
*
- * @todo In the JVM spec, an object reference seems to look like an
- * arbitrary integer token. However, looking at the JNI header
- * file for the Solaris JDK 1.4.2_06 implementation, it appears
- * to be a pointer to an empty structure. The apparent purpose
- * of this definition is to have a @e completely generic
- * definition of use by any implementation. @b HOWEVER, there
- * is a problem with this: What happens when the implementation
- * is ported to a 64-bit hardware runtime environment? All
- * pointers change from 32 bits (namely, from
- * @c @b sizeof(jint)) to 64 bits (namely,
+ * @todo HARMONY-6-jvm-jlObject.h-1 In the JVM spec, an object reference
+ * seems to look like an arbitrary integer token. However,
+ * looking at the JNI header file for the Solaris JDK 1.4.2_06
+ * implementation, it appears to be a pointer to an empty
+ * structure. The apparent purpose of this definition is to
+ * have a @e completely generic definition of use by any
+ * implementation. @b HOWEVER, there is a problem with this:
+ * What happens when the implementation is ported to a 64-bit
+ * hardware runtime environment? All pointers change from
+ 32 bits (namely, from @c @b sizeof(jint)) to 64 bits (namely,
* @c @b sizeof(jlong)), taking a second 32-bit word.
* This can have @e significant implications for code, and not
* only for the JNI interface. This needs some detailed scrutiny
@@ -182,7 +187,7 @@
* properly compensates for this situtation or declares it a
* non-issue.
*
- * @note As an aside, and in addition to the above @todo item, the
+ * @note As an aside, and in addition to the above @@todo item, the
* consider that many GC implementations use a variation
* of "copying garbage collection" (sometimes with adjectives
* in front, such as "generational copying garbage collection,"
@@ -208,15 +213,17 @@
* @link jvm/src/jvmcfg.h jvmcfg.h@endlink.
*
* @attention As long as this type definition is the same width or
- * narrower than the local definition of @b jvm_object_hash, all
- * code will connect the JNI and JVM environments properly. Some
- * Java implementations may consider @c @b jobject to be an ordinal,
- * some may consider it to be an array index, some may consider it
- * to be a pointer. If @c @b jclass is compatible with such definition,
- * then everything should work fine. The compiler will provide the
- * necessary width adjustments without loss of any significant digits.
- * @e Therefore, notice that this data type @e cannot be defined as
- * being any @e wider than @c @b jobject and @b jvm_object_hash.
+ * narrower than the local definition of @b jvm_object_hash,
+ * all code will connect the JNI and JVM environments
+ * properly. Some Java implementations may consider
+ * @c @b jobject to be an ordinal, some may consider it to
+ * be an array index, some may consider it to be a pointer.
+ * If @c @b jclass is compatible with such definition,
+ * then everything should work fine. The compiler will
+ * provide the necessary width adjustments without loss of
+ * any significant digits. @e Therefore, notice that this
+ * data type @e cannot be defined as being any @e wider than
+ * @c @b jobject and @b jvm_object_hash.
*/
typedef jclass jvm_class_index;
@@ -301,7 +308,9 @@
/*!
* @name Connection to local native method tables.
*
- * @brief These manifest constant code fragments are designed to be
+ * @brief Manifest constants code fragments.
+ *
+ * These code fragments are designed to be
* inserted directly into locations in
* @link jvm/src/native.c native.c@endlink without any other
* modification to that file except a @e single entry to actually
@@ -314,6 +323,7 @@
/*!
* @brief Complete list of local native method ordinals
* for @c @b java.lang.Object
+ *
*/
#define NATIVE_TABLE_JLOBJECT \
case JLOBJECT_NMO_GETCLASS: \
@@ -324,6 +334,7 @@
/*!
* @brief Table of local native methods and their descriptors
* for @c @b java.lang.Object
+ *
*/
#define NATIVE_TABLE_JLOBJECT_ORDINALS \
{ \
@@ -344,6 +355,7 @@
/*!
* @brief @c @b (jvoid) local native method ordinal table
* for @c @b java.lang.Object
+ *
*/
#define NATIVE_TABLE_JLOBJECT_JVOID \
case JLOBJECT_NMO_WAIT4EVER: \
@@ -352,6 +364,7 @@
/*!
* @brief @c @b (jobject) local native method ordinal table
* for @c @b java.lang.Object
+ *
*/
#define NATIVE_TABLE_JLOBJECT_JOBJECT \
case JLOBJECT_NMO_GETCLASS:
@@ -359,6 +372,7 @@
/*!
* @brief @c @b (jint) local native method ordinal table
* for @c @b java.lang.Object
+ *
*/
#define NATIVE_TABLE_JLOBJECT_JINT \
case JLOBJECT_NMO_HASHCODE:
Modified: incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/include/jlString.h
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/include/jlString.h?rev=326483&r1=326482&r2=326483&view=diff
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/include/jlString.h (original)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/include/jlString.h Wed Oct 19 01:47:31 2005
@@ -68,7 +68,9 @@
*
* @section Control
*
- * \$URL$ \$Id$
+ * \$URL$
+ *
+ * \$Id$
*
* Copyright 2005 The Apache Software Foundation
* or its licensors, as applicable.
@@ -92,6 +94,7 @@
* @date \$LastChangedDate$
*
* @author \$LastChangedBy$
+ *
* Original code contributed by Daniel Lydick on 09/28/2005.
*
* @section Reference
@@ -101,7 +104,9 @@
/**********************************************************************/
#ifdef JLSTRING_LOCAL_DEFINED
-ARCH_COPYRIGHT_APACHE(jlString, h, "$URL$ $Id$");
+ARCH_HEADER_COPYRIGHT_APACHE(jlString, h,
+"$URL$",
+"$Id$");
/**********************************************************************/
#else /* JLSTRING_LOCAL_DEFINED */
@@ -139,10 +144,12 @@
/*
* Add one function prototype below
* for each local native method enumeration above:
+ *
*/
/*!
* @brief JNI hook to @link #jlString_intern() intern()@endlink
+ *
*/
extern jvm_object_hash jlString_intern(jvm_object_hash objhash);
@@ -154,7 +161,9 @@
/*!
* @name Connection to local native method tables.
*
- * @brief These manifest constant code fragments are designed to be
+ * @brief Manifest constant code fragments.
+ *
+ * These code fragments are designed to be
* inserted directly into locations in
* @link jvm/src/native.c native.c@endlink without any other
* modification to that file except a @e single entry to actually
@@ -166,6 +175,7 @@
/*!
* @brief Complete list of local native method ordinals
* for @c @b java.lang.String
+ *
*/
#define NATIVE_TABLE_JLSTRING \
case JLSTRING_NMO_INTERN:
@@ -173,6 +183,7 @@
/*!
* @brief Table of local native methods and their descriptors
* for @c @b java.lang.String
+ *
*/
#define NATIVE_TABLE_JLSTRING_ORDINALS \
{ \
@@ -192,6 +203,7 @@
/*!
* @brief @c @b (jobject) local native method ordinal table
* for @c @b java.lang.String
+ *
*/
#define NATIVE_TABLE_JLSTRING_JOBJECT \
case JLSTRING_NMO_INTERN:
Modified: incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/include/jlThread.h
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/include/jlThread.h?rev=326483&r1=326482&r2=326483&view=diff
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/include/jlThread.h (original)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/include/jlThread.h Wed Oct 19 01:47:31 2005
@@ -71,7 +71,9 @@
*
* @section Control
*
- * \$URL$ \$Id$
+ * \$URL$
+ *
+ * \$Id$
*
* Copyright 2005 The Apache Software Foundation
* or its licensors, as applicable.
@@ -95,6 +97,7 @@
* @date \$LastChangedDate$
*
* @author \$LastChangedBy$
+ *
* Original code contributed by Daniel Lydick on 09/28/2005.
*
* @section Reference
@@ -104,7 +107,9 @@
/**********************************************************************/
#ifdef JLTHREAD_LOCAL_DEFINED
-ARCH_COPYRIGHT_APACHE(jlThread, h, "$URL$ $Id$");
+ARCH_HEADER_COPYRIGHT_APACHE(jlThread, h,
+"$URL$",
+"$Id$");
/**********************************************************************/
#else /* JLTHREAD_LOCAL_DEFINED */
@@ -208,38 +213,45 @@
/*
* Add one function prototype below
* for each local native method enumeration above:
+ *
*/
/*!
* @brief JNI hook to @link #jlThread_currentThread()
currentThread()@endlink
+ *
*/
extern
jvm_object_hash jlThread_currentThread(jvm_class_index clsidxTHR);
/*!
* @brief JNI hook to @link #jlThread_yield() yield()@endlink
+ *
*/
extern jvoid jlThread_yield(jvm_class_index clsidxTHR);
/*!
* @brief JNI hook to @link #jlThread_interrupt() interrupt()@endlink
+ *
*/
extern jvoid jlThread_interrupt(jvm_object_hash objhashthis);
/*!
*@brief JNI hook to @link #jlThread_interrupted() interrupted()@endlink
+ *
*/
extern jboolean jlThread_interrupted(jvm_object_hash objhashTHR);
/*!
* @brief JNI hook to
* @link #jlThread_isInterrupted() isInterrupted()@endlink
+ *
*/
extern jboolean jlThread_isInterrupted(jvm_object_hash objhashthis);
/*!
* @brief JNI hook to @link #jlThread_sleep() sleep()@endlink
+ *
*/
extern jboolean jlThread_sleep(jvm_class_index clsidxTHR,
jlong sleeptime_milliseconds);
@@ -247,6 +259,7 @@
/*!
* @brief JNI hook to
* @link #jlThread_sleep_nanos() sleep_nanos()@endlink
+ *
*/
extern jboolean jlThread_sleep_nanos(jvm_class_index clsidxTHR,
jlong sleeptime_milliseconds,
@@ -254,11 +267,13 @@
/*!
* @brief JNI hook to @link #jlThread_join4ever() join4ever()@endlink
+ *
*/
extern jvoid jlThread_join4ever(jvm_object_hash objhashthis);
/*!
* @brief JNI hook to @link #jlThread_jointimed() jointimed()@endlink
+ *
*/
extern jvoid jlThread_jointimed(jvm_object_hash objhashthis,
jlong sleeptime);
@@ -266,6 +281,7 @@
/*!
* @brief JNI hook to
* @link #jlThread_jointimed_nanos() jointimed_nanos()@endlink
+ *
*/
extern jvoid jlThread_jointimed_nanos(jvm_object_hash objhashthis,
jlong sleeptime,
@@ -273,22 +289,26 @@
/*!
* @brief JNI hook to @link #jlThread_jointimed() jointimed()@endlink
+ *
*/
extern jboolean jlThread_isAlive(jvm_object_hash objhashthis);
/*!
* @brief JNI hook to @link #jlThread_start() start()@endlink
+ *
*/
extern jboolean jlThread_start(jvm_object_hash objhashthis);
/*!
* @brief JNI hook to
* @link #jlThread_countStackFrames() countStackFrames()@endlink
+ *
*/
extern jint jlThread_countStackFrames(jvm_object_hash objhashthis);
/*!
* @brief JNI hook to @link #jlThread_holdsLock() holdsLock()@endlink
+ *
*/
extern jboolean jlThread_holdsLock(jvm_class_index clsidxTHR,
jvm_object_hash objhashLOCK);
@@ -296,6 +316,7 @@
/*!
* @brief JNI hook to
* @link #jlThread_setPriority() setPriority()@endlink
+ *
*/
extern jboolean jlThread_setPriority(jvm_object_hash objhashthis,
jint priority);
@@ -303,43 +324,51 @@
/*!
* @brief JNI hook to
* @link #jlThread_getPriority() getPriority()@endlink
+ *
*/
extern jint jlThread_getPriority(jvm_object_hash objhashthis);
/*!
* @brief JNI hook to @link #jlThread_destroy() destroy()@endlink
+ *
*/
extern jboolean jlThread_destroy(jvm_object_hash objhashthis);
/*!
* @brief JNI hook to
* @link #jlThread_checkAccess() checkAccess()@endlink
+ *
*/
extern jboolean jlThread_checkAccess(jvm_object_hash objhashthis);
/*!
* @brief JNI hook to @link #jlThread_setDaemon() setDaemon()@endlink
+ *
*/
extern jvoid jlThread_setDaemon(jvm_object_hash objhashthis,
jboolean isdaemon);
/*!
* @brief JNI hook to @link #jlThread_isDaemon() isDaemon()@endlink
+ *
*/
extern jboolean jlThread_isDaemon(jvm_object_hash objhashthis);
/*!
* @brief JNI hook to @link #jlThread_stop() stop()@endlink
+ *
*/
extern jvoid jlThread_stop(jvm_object_hash objhashthis);
/*!
* @brief JNI hook to @link #jlThread_suspend() suspend()@endlink
+ *
*/
extern jvoid jlThread_suspend(jvm_object_hash objhashthis);
/*!
* @brief JNI hook to @link #jlThread_resume() resume()@endlink
+ *
*/
extern jvoid jlThread_resume(jvm_object_hash objhashthis);
@@ -351,7 +380,9 @@
/*!
* @name Connection to local native method tables.
*
- * @brief These manifest constant code fragments are designed to be
+ * @brief Manifest constant code fragments.
+ *
+ * These code fragments are designed to be
* inserted directly into locations in
* @link jvm/src/native.c native.c@endlink without any other
* modification to that file except a @e single entry to actually
@@ -363,6 +394,7 @@
/*!
* @brief Complete list of local native method ordinals
* for @c @b java.lang.Thread
+ *
*/
#define NATIVE_TABLE_JLTHREAD \
case JLTHREAD_NMO_CURRENTTHREAD: \
@@ -390,6 +422,7 @@
/*!
* @brief Table of local native methods and their descriptors
* for @c @b java.lang.Thread
+ *
*/
#define NATIVE_TABLE_JLTHREAD_ORDINALS \
{ \
@@ -433,6 +466,7 @@
/*!
* @brief @c @b (jvoid) local native method ordinal table
* for @c @b java.lang.Thread
+ *
*/
#define NATIVE_TABLE_JLTHREAD_JVOID \
case JLTHREAD_NMO_YIELD: \
@@ -454,6 +488,7 @@
/*!
* @brief @c @b (jobject) local native method ordinal table
* for @c @b java.lang.Thread
+ *
*/
#define NATIVE_TABLE_JLTHREAD_JOBJECT \
case JLTHREAD_NMO_CURRENTTHREAD:
@@ -461,6 +496,7 @@
/*!
* @brief @c @b (jint) local native method ordinal table
* for @c @b java.lang.Thread
+ *
*/
#define NATIVE_TABLE_JLTHREAD_JINT \
case JLTHREAD_NMO_INTERRUPTED: \