Main Page | Namespace List | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

thread.h

Go to the documentation of this file.
00001 #ifndef _thread_h_included_
00002 #define _thread_h_included_
00003 
00004 /*!
00005  * @file thread.h
00006  *
00007  * @brief Definition of the @c @b java.lang.Thread structure in
00008  * this real machine implementation.
00009  *
00010  * There is no notion of a thread group natively in this JVM.  Thread
00011  * groups are supported at the class library level.
00012  *
00013  * @section Control
00014  *
00015  * \$URL: https://svn.apache.org/path/name/thread.h $ \$Id: thread.h 0 09/28/2005 dlydick $
00016  *
00017  * Copyright 2005 The Apache Software Foundation
00018  * or its licensors, as applicable.
00019  *
00020  * Licensed under the Apache License, Version 2.0 ("the License");
00021  * you may not use this file except in compliance with the License.
00022  * You may obtain a copy of the License at
00023  *
00024  *     http://www.apache.org/licenses/LICENSE-2.0
00025  *
00026  * Unless required by applicable law or agreed to in writing,
00027  * software distributed under the License is distributed on an
00028  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
00029  * either express or implied.
00030  *
00031  * See the License for the specific language governing permissions
00032  * and limitations under the License.
00033  *
00034  * @version \$LastChangedRevision: 0 $
00035  *
00036  * @date \$LastChangedDate: 09/28/2005 $
00037  *
00038  * @author \$LastChangedBy: dlydick $
00039  *         Original code contributed by Daniel Lydick on 09/28/2005.
00040  *
00041  * @section Reference
00042  *
00043  */
00044 
00045 ARCH_COPYRIGHT_APACHE(thread, h, "$URL: https://svn.apache.org/path/name/thread.h $ $Id: thread.h 0 09/28/2005 dlydick $");
00046 
00047 
00048 #include <setjmp.h>  /* For jmp_buf structure for setjmp(3)/longjmp(3)*/
00049 
00050 #include "jvmreg.h"
00051 
00052 /*!
00053  * @name Macros for addressing threads
00054  *
00055  *
00056  * @param thridx  Thread table index into the global
00057  * @link #rjvm.thread rjvm.thread[]@endlink array (via
00058  * @link #pjvm pjvm->thread[]@endlink).
00059  * 
00060  */
00061 
00062 /*@{ */ /* Begin grouped definitions */
00063 
00064 /*!
00065  * @def THREAD
00066  * @brief Access structures of thread table at certain index.
00067  *
00068  * The thread table, being an array of slots, provides space for
00069  * one thread instance per slot.  This macro references one of
00070  * them using the @p @b thridx index.
00071  *
00072  * @returns pointer to a thread slot
00073  * 
00074  */
00075 #define THREAD(thridx) pjvm->thread[thridx]
00076 
00077 #define CURRENT_THREAD pjvm->current_thread /**< Access structures of
00078                                              * the thread now running
00079                                              * in the JVM.
00080                                              */
00081 
00082 #define PREV_STATE(thridx) THREAD(thridx).prev_state /**<
00083                                              * Previous actual thread
00084                                              * state.
00085                                              */
00086 
00087 #define THIS_STATE(thridx) THREAD(thridx).this_state /**<
00088                                              * This current thread
00089                                              * state.
00090                                              */
00091 
00092 #define NEXT_STATE(thridx) THREAD(thridx).next_state /**<
00093                                              * Next requested thread
00094                                              * state.
00095                                              */
00096 
00097 #define REQ_NEXT_STATE(state, thridx) \
00098     threadstate_request_##state(thridx)     /**< Place a thread into
00099                                              * requested thread state,
00100                                              * see @link
00101                                               #threadstate_request_new()
00102                                        threadstate_request_XXX()@endlink
00103                                              * for specifics.
00104                                              */
00105 
00106 #define CURRENT_THREAD_REQUEST_NEXT_STATE(state) \
00107     REQ_NEXT_STATE(state, CURRENT_THREAD)   /**< Request that the
00108                                              * current thread move into
00109                                              * a certain thread state,
00110                                              * see @link
00111                                               #threadstate_request_new()
00112                                        threadstate_request_XXX()@endlink
00113                                              * for specifics.
00114                                              */
00115 
00116 #define THREAD_REQUEST_NEXT_STATE(state, thridx) \
00117     REQ_NEXT_STATE(state, thridx)           /**< Request that an
00118                                              * arbitrary thread move
00119                                              * into a certain thread
00120                                              * state,
00121                                              * see @link
00122                                               #threadstate_request_new()
00123                                        threadstate_request_XXX()@endlink
00124                                              * for specifics.
00125                                              */
00126 
00127 #define CURRENT_THREAD_ACTIVATE_THIS_STATE(state) \
00128     threadstate_activate_##state(CURRENT_THREAD) /**<
00129                                              * Activate current thread
00130                                              * state, actually moving
00131                                              * it from a prior state
00132                                              * into a requested state,
00133                                              * see @link
00134                                              #threadstate_activate_new()
00135                                       threadstate_activate_XXX()@endlink
00136                                              * for specifics.
00137                                              */
00138 
00139 #define THREAD_ACTIVATE_THIS_STATE(state, thridx) \
00140     threadstate_activate_##state(thridx)    /**<
00141                                              * Activate arbitrary thread
00142                                              * state, actually moving it
00143                                              * from a prior state into
00144                                              * a requested state, see
00145                                              * @link
00146                                              #threadstate_activate_new()
00147                                       threadstate_activate_XXX()@endlink
00148                                              * for specifics.
00149                                              */
00150 
00151 #define CURRENT_THREAD_PROCESS_THIS_STATE(state) \
00152     threadstate_process_##state(CURRENT_THREAD) /**<
00153                                              * Process activities for
00154                                              * current thread in its
00155                                              * current state, see
00156                                              * @link
00157                                               #threadstate_process_new()
00158                                        threadstate_process_XXX()@endlink
00159                                              * for specifics.
00160                                              */
00161 
00162 #define THREAD_PROCESS_THIS_STATE(state, thridx) \
00163     threadstate_process_##state(thridx)     /**<
00164                                              * Process activities for
00165                                              * an arbitrary thread in
00166                                              * its current state, see
00167                                              * @link
00168                                               #threadstate_process_new()
00169                                        threadstate_process_XXX()@endlink
00170                                              * for specifics.
00171                                              */
00172 
00173 /*@} */ /* End of grouped definitions */
00174 
00175 
00176 /*!
00177  * @name Thread state machine state definitions.
00178  *
00179  * @brief Thread state machine state names, including min and max
00180  * states.
00181  *
00182  */
00183 /*@{ */ /* Begin grouped definitions */
00184 
00185 typedef enum
00186 {
00187     THREAD_STATE_NEW           = 0, /**< Newly allocated thread */
00188     THREAD_STATE_START         = 1, /**< @b (transient state) Thread has
00189                                          been started */
00190     THREAD_STATE_RUNNABLE      = 2, /**< Thread may run JVM code */
00191     THREAD_STATE_RUNNING       = 3, /**< Thread is running JVM code */
00192     THREAD_STATE_COMPLETE      = 4, /**< @b (transient state) Thread has
00193                                          finished running JVM code */
00194     THREAD_STATE_BLOCKINGEVENT = 5, /**< @b (transient state) Desist
00195                                          from @b RUNING JVM code due to
00196                                          I/O request or control
00197                                          request such as
00198                                          @c @b sleep() or
00199                                          @c @b join() */
00200     THREAD_STATE_BLOCKED       = 6, /**< Wait for completion of I/O 
00201                                          request or control request
00202                                          such as @c @b sleep()
00203                                          or @c @b join() */
00204     THREAD_STATE_UNBLOCKED     = 7, /**< @b (transient state) I/O or
00205                                          control request completed, now
00206                                          can be @b RUNNABLE again. */
00207     THREAD_STATE_SYNCHRONIZED  = 8, /**< @b (transient state) Entered a
00208                                          @c @b synchronized
00209                                          block */
00210     THREAD_STATE_RELEASE       = 9, /**< @b (transient state) A
00211                                          @c @b wait() request
00212                                          released its lock. */
00213     THREAD_STATE_WAIT          = 10, /**< @c @b wait() for a
00214                                           @c @b notify(),
00215                                           @c @b notifyAll()
00216                                           or @c @b interrupt()
00217                                           event. */
00218     THREAD_STATE_NOTIFY        = 11, /**< Received a
00219                                           @c @b notify(),
00220                                           @c @b notifyAll()
00221                                           or @c @b interrupt()
00222                                           event. */
00223     THREAD_STATE_LOCK          = 12, /**< Negotiate to @b ACQUIRE the
00224                                           object's monitor lock again.*/
00225     THREAD_STATE_ACQUIRE       = 13, /**< @b (transient state)
00226                                           Re-acquired object's monitor
00227                                           lock, may be @b RUNNABLE
00228                                           again. */
00229     THREAD_STATE_DEAD          = 14, /**< All work complete, ready to
00230                                           deallocate thread slot. */
00231     THREAD_STATE_BADLOGIC      = 15 /**< Not in spec, code convenience
00232                                           for dealing with illegal
00233                                           operational conditions. */
00234 } thread_state_enum;
00235 
00236 
00237 #define THREAD_STATE_MIN_STATE    THREAD_STATE_NEW /**< Lowest possible
00238                                                         state number */
00239 #define THREAD_STATE_MAX_STATE    THREAD_STATE_BADLOGIC /**< Highest
00240                                                         possible state
00241                                                         number */
00242 /*@} */ /* End of grouped definitions */
00243 
00244 /*!
00245  * @name JVM state priority definitions.
00246  *
00247  */
00248 
00249 /*@{ */ /* Begin grouped definitions */
00250 
00251 typedef enum
00252 {
00253     THREAD_PRIORITY_BAD   = 0, /**< Not in spec, but useful in code */
00254     THREAD_PRIORITY_MIN   = 1, /**< Minimum thread priority */
00255     THREAD_PRIORITY_NORM  = 5, /**< Normal thread priority */
00256     THREAD_PRIORITY_MAX   = 10 /**< Maximum thread priority */
00257 
00258 } thread_priority_enum;
00259 
00260 /*@} */ /* End of grouped definitions */
00261 
00262 
00263 /*!
00264  * @brief Real machine thread model implementation.
00265  */
00266 typedef struct
00267 {
00268 
00269 /*********** Thread definitions ****************************/
00270 
00271     jvm_thread_index id;         /**< Self-same ID of this thread */
00272 
00273     rchar            *name;      /**< Name of thread
00274                                   *  @todo not impl.
00275                                   */
00276 #define THREAD_NAME_MAX_LEN 64   /**< Arbitrary max thread name length*/
00277 
00278     jvm_object_hash thread_objhash;/**< Object hash for associated
00279                                         java.lang.Thread object */
00280 
00281     thread_priority_enum priority; /**< Runtime THREAD_PRIORITY_xxx */
00282 
00283     rushort          status;    /**< Runtime status of thread, bitwise*/
00284 
00285 /****** First 2 bits same for class, object, and thread ***********/
00286 #define THREAD_STATUS_EMPTY 0x0000 /**< This slot is available for use.
00287                                     *   <b>DO NOT CHANGE</b> since this
00288                                     *   is also the normal
00289                                     *   @c @b setjmp(3) return code
00290                                     *   from @link
00291                                         #thread_exception_setup()
00292                                         thread_exception_setup()@endlink
00293                                     */
00294 #define THREAD_STATUS_INUSE 0x0001 /**< This slot contains a thread */
00295 #define THREAD_STATUS_NULL  0x0002 /**< Null thread (only 1 exists in
00296                                     * normal use, any else besides the
00297                                     * JVMCFG_NULL_THREAD is a thread
00298                                     * slot that is being initialized.)*/
00299 /******************************************************************/
00300 
00301 /****** The remaining bits are unique to thread *******************/
00302 #define THREAD_STATUS_ISDAEMON  0x0004 /**< Daemon thread state, vs user
00303                                        thread, per Thread.isdaemon() */
00304 
00305 #define THREAD_STATUS_SLEEP     0x0008 /**< thread is sleeping */
00306 
00307 #define THREAD_STATUS_JOIN4EVER 0x0010 /**< thread has unconditionally
00308                                             joined another */
00309 
00310 #define THREAD_STATUS_JOINTIMED 0x0020 /**< thread has joined another,
00311                                      but is waiting for a finite time */
00312 
00313 #define THREAD_STATUS_WAIT4EVER 0x0040 /**< thread is unconditionally
00314                                             waiting */
00315 
00316 #define THREAD_STATUS_WAITTIMED 0x0080 /**< thread is waiting, but
00317                                             finite time */
00318 
00319 #define THREAD_STATUS_SUSPEND   0x0100 /**< thread is suspended, can
00320                                             be resumed */
00321 
00322 #define THREAD_STATUS_INTERRUPTIBLEIO 0x0200 /**< thread is waiting on
00323                                an interruptable I/O channel in class
00324                                java.nio.channels.InterruptibleChannel */
00325 
00326 #define THREAD_STATUS_NOTIFIED  0x0400 /**< thread has been notified */
00327 
00328 
00329 #define THREAD_STATUS_INTERRUPTED 0x0800 /**< thread has been
00330                                               interrupted */
00331 
00332 #define THREAD_STATUS_THREW_EXCEPTION 0x1000 /**< thread threw a
00333                                   * @c @b java.lang.Exception
00334                                   * (but NOT a
00335                                   * @c @b java.lang.Error).  The
00336                                   * object type is found in @link
00337                                     #rthread.pThrowableEvent
00338                                     pThrowableEvent@endlink and is not
00339                                   * @link #rnull rnull@endlink.
00340                                   */
00341 
00342 #define THREAD_STATUS_THREW_ERROR     0x2000 /**< thread threw a
00343                                   * @c @b java.lang.Error
00344                                   * (but NOT a
00345                                   * @c @b java.lang.Exception).
00346                                   * The object type is found in @link
00347                                     #rthread.pThrowableEvent
00348                                     pThrowableEvent@endlink and is not
00349                                   * @link #rnull rnull@endlink.
00350                                   */
00351 
00352 #define THREAD_STATUS_THREW_THROWABLE 0x4000 /**< thread threw a
00353                                   * @c @b java.lang.Throwable
00354                                   * of unknowable type.  The
00355                                   * object type is found in @link
00356                                     #rthread.pThrowableEvent
00357                                     pThrowableEvent@endlink and is not
00358                                   * @link #rnull rnull@endlink.
00359                                   */
00360 
00361 #define THREAD_STATUS_THREW_UNCAUGHT 0x8000 /**< A
00362                                   * @c @b java.lang.Throwable
00363                                   * of some type was thrown, but not
00364                                   * handled by the Java code itself.
00365                                   *  Instead, it will be handled
00366                                   * by the default
00367                            @c @b java.lang.ThreadGroup.uncaughtException
00368                                   * method.  The value of @link
00369                                     #rthread.pThrowableEvent
00370                                             pThrowableEvent@endlink
00371                                   * will be @link #rnull rnull@endlink.
00372                                   */
00373 
00374 /******************************************************************/
00375 
00376     rchar *pThrowableEvent;      /**< Exception, Error, or Throwable
00377                                   * that was thrown by this thread.
00378                                   * @link #rnull rnull@endlink
00379                                   * if nothing was thrown.
00380                                   */
00381 
00382     jmp_buf *pnonlocal_ThrowableEvent; /**< Non-local return from
00383                                   * Exception, Error, and Throwable
00384                                   * conditions.
00385                                   *
00386                                   * @note Play pointer games to persuade
00387                                   * runtime package to accept a jmp_buf
00388                                   * that is within a structure.  Whether
00389                                   * this is a "feature" of the Solaris
00390                                   * version of the library remains to be
00391                                   * seen.
00392                                   *
00393                                   * Refer to opcode_run() for more
00394                                   * information.
00395                                   */
00396 
00397 
00398 /*********** State and blocking definitions ****************/
00399 
00400     thread_state_enum prev_state; /**< Previous @link #THREAD_STATE_NEW
00401                                        THREAD_STATE_xxx@endlink
00402                                        (for diagnostics) */
00403 
00404     thread_state_enum this_state; /**< Current @link #THREAD_STATE_NEW
00405                                        THREAD_STATE_xxx@endlink */
00406 
00407     thread_state_enum next_state; /**< Next scheduled
00408                                        @link #THREAD_STATE_NEW
00409                                        THREAD_STATE_xxx@endlink */
00410 
00411     jvm_thread_index jointarget; /**< Doing @c @b Thread.join()
00412                                       onto this thread */
00413 
00414     volatile jlong   sleeptime;  /**< Milliseconds left on either
00415                                   * @c @b Thread.sleep()
00416                                   * or on a timed
00417                                   * @c @b Thread.wait()
00418                                   * or a timed
00419                                   * @c @b Thread.join().
00420                                   * See also comments in
00421                                     @link jvm/src/jvm.h jvm.h@endlink
00422                                   * and in @link jvm/src/timeslice.c
00423                                     timeslice.c@endlink.
00424                                   */
00425 
00426     jvm_object_hash  locktarget; /**< Doing @c @b Object.wait()
00427                                   * on this object.
00428                                   *
00429                                   * @todo  This implementation can only
00430                                   * handle ONE SINGLE monitor lock.
00431                                   * Does it need to be able to
00432                                   * handle arbitrary number of them at
00433                                   * once?
00434                                   */
00435 
00436 
00437 /*********** Program counter definitions *******************/
00438 
00439     jvm_pc pc;                   /**< Program counter of this thread */
00440 
00441     ruint  pass_instruction_count;   /**< Number of JVM instructions
00442                                       * that have been run during this
00443                                       * pass.
00444                                       */
00445 
00446     rulong thread_instruction_count; /**< Total number of JVM
00447                                       * instructionsthat have been
00448                                       * run by this thread.
00449                                       */
00450 
00451 
00452 /*********** Stack pointer definitions *********************/
00453 
00454     jint   *stack;               /**< Stack area for this thread */
00455 
00456     jvm_sp sp;                   /**< Stack pointer of this thread */
00457 
00458     jvm_sp fp;                   /**< Frame pointer in stack
00459                                       to this stack frame.  */
00460 
00461     jvm_sp fp_end_program;       /**< Final frame pointer in stack of
00462                                   * place to stop execution, starting
00463                                   * at beginning of program, but could
00464                                   * be changed to a throwable event
00465                                   * or some other arbitrary stack
00466                                   * frame.  Once the inner loop
00467                                   * detects that the next stack frame
00468                                   * would move beyond this boundary,
00469                                   * JVM inner loop execution halts.
00470                                   */
00471 
00472 } rthread;
00473 
00474 
00475 /*!
00476  * @name Thread state name strings
00477  *
00478  */
00479 
00480 /*@{ */ /* Begin grouped definitions */
00481 
00482 extern const rchar *thread_state_name;
00483 
00484 #define THREAD_STATE_NEW_DESC           "new"
00485 #define THREAD_STATE_START_DESC         "started"
00486 #define THREAD_STATE_RUNNABLE_DESC      "runnable"
00487 #define THREAD_STATE_RUNNING_DESC       "running"
00488 #define THREAD_STATE_COMPLETE_DESC      "complete"
00489 #define THREAD_STATE_BLOCKINGEVENT_DESC "blockingevent"
00490 #define THREAD_STATE_BLOCKED_DESC       "blocked"
00491 #define THREAD_STATE_UNBLOCKED_DESC     "unblocked"
00492 #define THREAD_STATE_SYNCHRONIZED_DESC  "synchronized"
00493 #define THREAD_STATE_RELEASE_DESC       "release"
00494 #define THREAD_STATE_WAIT_DESC          "wait"
00495 #define THREAD_STATE_NOTIFY_DESC        "notify"
00496 #define THREAD_STATE_LOCK_DESC          "lock"
00497 #define THREAD_STATE_ACQUIRE_DESC       "acquire"
00498 #define THREAD_STATE_DEAD_DESC          "dead"
00499 #define THREAD_STATE_BADLOGIC_DESC      "bad_logic"
00500 #define THREAD_STATE_ILLEGAL_DESC       "illegal"
00501 
00502 /*@} */ /* End of grouped definitions */
00503 
00504 
00505 /* Prototypes for functions in 'thread.c' */
00506 
00507 extern const rchar *thread_state_get_name(rushort state);
00508 
00509 extern jvm_thread_index thread_class_load(rchar        *clsname,
00510                                           rchar        *mthname,
00511                                           rchar        *mthdesc,
00512                                           rint          priority,
00513                                           rboolean      isdaemon,
00514                                           rboolean      usesystemthread,
00515                                          rboolean find_registerNatives);
00516 
00517 extern rvoid thread_init(rvoid);
00518 
00519 extern rboolean thread_die(jvm_thread_index thridx);
00520 
00521 extern rvoid thread_shutdown(rvoid);
00522 
00523 extern int thread_exception_setup(jvm_thread_index thridx);
00524  
00525 extern rvoid thread_throw_exception(jvm_thread_index  thridx,
00526                                     rushort  thread_status_bits,
00527                                     rchar   *exception_name);
00528 
00529 /* Prototypes for functions in 'threadstate.c' */
00530 
00531 /*!
00532  * @name Thread state phases.
00533  *
00534  * @brief Each thread state has three phases, each of which is handled
00535  * by a dedicated function.
00536  *
00537  * @b Requesting a state checks to see if a transition from the current
00538  * state into the requested state is valid.  If so, the @b NEXT
00539  * state is set to the requested one.  If not, the request is
00540  * ignored.
00541  *
00542  * @b Activating a state moves the thread into the requested @b NEXT
00543  * state so its @b THIS state changes.  Its @b PREV state then reports
00544  * the former state.
00545  *
00546  * @b Processing a state performs the activities for that state.
00547  *
00548  *
00549  * @param thridx Thread table index of thread to process.
00550  *
00551  *
00552  * @returns @link #rtrue rtrue@endlink if activities transpired
00553  *          normally, otherwise @link #rfalse rfalse@endlink.
00554  *
00555  */
00556 
00557 /*@{ */ /* Begin grouped definitions */
00558 
00559 extern rboolean threadstate_request_new(jvm_thread_index thridx);
00560 extern rboolean threadstate_request_start(jvm_thread_index thridx);
00561 extern rboolean threadstate_request_runnable(jvm_thread_index thridx);
00562 extern rboolean threadstate_request_running(jvm_thread_index thridx);
00563 extern rboolean threadstate_request_complete(jvm_thread_index thridx);
00564 extern rboolean threadstate_request_blockingevent(jvm_thread_index
00565                                                                 thridx);
00566 extern rboolean threadstate_request_blocked(jvm_thread_index thridx);
00567 extern rboolean threadstate_request_unblocked(jvm_thread_index thridx);
00568 extern rboolean threadstate_request_synchronized(jvm_thread_index
00569                                                                 thridx);
00570 extern rboolean threadstate_request_release(jvm_thread_index thridx);
00571 extern rboolean threadstate_request_wait(jvm_thread_index thridx);
00572 extern rboolean threadstate_request_notify(jvm_thread_index thridx);
00573 extern rboolean threadstate_request_lock(jvm_thread_index thridx);
00574 extern rboolean threadstate_request_acquire(jvm_thread_index thridx);
00575 extern rboolean threadstate_request_dead(jvm_thread_index thridx);
00576 extern rboolean threadstate_request_badlogic(jvm_thread_index thridx);
00577 
00578 extern rboolean threadstate_activate_new(jvm_thread_index thridx);
00579 extern rboolean threadstate_activate_start(jvm_thread_index thridx);
00580 extern rboolean threadstate_activate_runnable(jvm_thread_index thridx);
00581 extern rboolean threadstate_activate_running(jvm_thread_index thridx);
00582 extern rboolean threadstate_activate_complete(jvm_thread_index thridx);
00583 extern rboolean threadstate_activate_blockingevent(jvm_thread_index
00584                                                                 thridx);
00585 extern rboolean threadstate_activate_blocked(jvm_thread_index thridx);
00586 extern rboolean threadstate_activate_unblocked(jvm_thread_index thridx);
00587 extern rboolean threadstate_activate_synchronized(jvm_thread_index
00588                                                                 thridx);
00589 extern rboolean threadstate_activate_release(jvm_thread_index thridx);
00590 extern rboolean threadstate_activate_wait(jvm_thread_index thridx);
00591 extern rboolean threadstate_activate_notify(jvm_thread_index thridx);
00592 extern rboolean threadstate_activate_lock(jvm_thread_index thridx);
00593 extern rboolean threadstate_activate_acquire(jvm_thread_index thridx);
00594 extern rboolean threadstate_activate_dead(jvm_thread_index thridx);
00595 extern rboolean threadstate_activate_badlogic(jvm_thread_index thridx);
00596 
00597 extern rboolean threadstate_process_new(jvm_thread_index thridx);
00598 extern rboolean threadstate_process_start(jvm_thread_index thridx);
00599 extern rboolean threadstate_process_runnable(jvm_thread_index thridx);
00600 extern rboolean threadstate_process_running(jvm_thread_index thridx);
00601 extern rboolean threadstate_process_complete(jvm_thread_index thridx);
00602 extern rboolean threadstate_process_blockingevent(jvm_thread_index
00603                                                                 thridx);
00604 extern rboolean threadstate_process_blocked(jvm_thread_index thridx);
00605 extern rboolean threadstate_process_unblocked(jvm_thread_index thridx);
00606 extern rboolean threadstate_process_synchronized(jvm_thread_index
00607                                                                 thridx);
00608 extern rboolean threadstate_process_release(jvm_thread_index thridx);
00609 extern rboolean threadstate_process_wait(jvm_thread_index thridx);
00610 extern rboolean threadstate_process_notify(jvm_thread_index thridx);
00611 extern rboolean threadstate_process_lock(jvm_thread_index thridx);
00612 extern rboolean threadstate_process_acquire(jvm_thread_index thridx);
00613 extern rboolean threadstate_process_dead(jvm_thread_index thridx);
00614 extern rboolean threadstate_process_badlogic(jvm_thread_index thridx);
00615 
00616 /*@} */ /* End of grouped definitions */
00617 
00618 
00619 /* Prototypes for functions in 'threadutil.c' */
00620 extern rvoid threadutil_update_sleeptime_interval(rvoid);
00621 
00622 extern rvoid threadutil_update_blockingevents(jvm_thread_index
00623                                                             thridxcurr);
00624 
00625 extern rvoid threadutil_update_wait(jvm_thread_index thridxcurr);
00626 
00627 extern rvoid threadutil_update_lock(jvm_thread_index thridxcurr);
00628 
00629 extern rboolean threadutil_holds_lock(jvm_thread_index thridx,
00630                                       jvm_object_hash  objhashlock);
00631 
00632 #endif /* _thread_h_included_ */
00633 
00634 
00635 /* EOF */
00636 

Generated on Fri Sep 30 18:49:08 2005 by  doxygen 1.4.4