jthread.h File Reference


Detailed Description

Java threading interface.

Java threading interface - contains functions to work with Java threads. The generic part od Java thrading interface is mostly targeted to address the needs of java.lang.Object and java.lang.Thread classes implementations. All functions in this interface start with <>jthread_* prefix. The implemnentation of this layer provides the mapping of Java thrads onto native/OS threads.

For more detailes, see thread manager component documentation located at vm/thread/doc/ThreadManager.htm


Basic manipulation

typedef JVMTIThreadjvmti_thread_t
typedef jthread_start_proc_datajthread_start_proc_data_t
typedef VM_threadvm_thread_t
VMEXPORT jlong jthread_thread_init (JNIEnv *jni_env, jthread java_thread, jobject weak_ref, hythread_t dead_thread)
VMEXPORT IDATA jthread_create (JNIEnv *jni_env, jthread thread, jthread_start_proc_data_t attrs)
VMEXPORT IDATA jthread_create_with_function (JNIEnv *jni_env, jthread thread, jthread_start_proc_data_t attrs)
VMEXPORT IDATA jthread_attach (JNIEnv *jni_env, jthread thread, jboolean daemon)
VMEXPORT IDATA jthread_detach (jthread thread)
VMEXPORT IDATA jthread_java_detach (jthread thread)
VMEXPORT IDATA jthread_vm_detach (vm_thread_t vm_thread)
VMEXPORT IDATA jthread_yield ()
VMEXPORT IDATA jthread_stop (jthread thread)
VMEXPORT IDATA jthread_exception_stop (jthread thread, jobject throwable)
VMEXPORT IDATA jthread_sleep (jlong millis, jint nanos)
VMEXPORT JNIEnvjthread_get_JNI_env (jthread thread)
VMEXPORT IDATA jthread_wait_for_all_nondaemon_threads ()

Functions

Identification
VMEXPORT jthread jthread_self (void)
VMEXPORT jlong jthread_get_id (jthread thread)
VMEXPORT jthread jthread_get_thread (jlong thread_id)
Top<->middle pointer conversion
VMEXPORT jthread jthread_get_java_thread (hythread_t thread)
Attributes access
VMEXPORT IDATA jthread_set_priority (jthread thread, jint priority)
VMEXPORT jint jthread_get_priority (jthread thread)
VMEXPORT IDATA jthread_set_name (jthread thread, jstring name)
 Sets the name for the thread.
VMEXPORT jstring jthread_get_name (jthread thread)
 Returns the name for the thread.
Interruption
VMEXPORT IDATA jthread_interrupt (jthread thread)
VMEXPORT jboolean jthread_is_interrupted (jthread thread)
VMEXPORT IDATA jthread_clear_interrupted (jthread thread)
Monitors
VMEXPORT IDATA jthread_monitor_init (jobject mon)
VMEXPORT IDATA jthread_monitor_enter (jobject mon)
VMEXPORT IDATA jthread_monitor_try_enter (jobject mon)
VMEXPORT IDATA jthread_monitor_exit (jobject mon)
VMEXPORT IDATA jthread_monitor_release (jobject mon)
VMEXPORT IDATA jthread_monitor_notify (jobject mon)
VMEXPORT IDATA jthread_monitor_notify_all (jobject mon)
VMEXPORT IDATA jthread_monitor_wait (jobject mon)
VMEXPORT IDATA jthread_monitor_timed_wait (jobject mon, jlong millis, jint nanos)
Parking
VMEXPORT IDATA jthread_park ()
VMEXPORT IDATA jthread_timed_park (jlong millis, jint nanos)
VMEXPORT IDATA jthread_unpark (jthread thread)
VMEXPORT IDATA jthread_park_until (jlong milis)
Suspension
VMEXPORT IDATA jthread_suspend (jobject thread)
VMEXPORT IDATA jthread_suspend_all (jvmtiError *results, jint count, const jobject *thread_list)
VMEXPORT IDATA jthread_resume (jobject thread)
VMEXPORT IDATA jthread_resume_all (jvmtiError *results, jint count, const jobject *thread_list)
VMEXPORT IDATA jthread_cancel_all ()


Typedef Documentation

typedef struct JVMTIThread* jvmti_thread_t

typedef struct jthread_start_proc_data* jthread_start_proc_data_t

typedef struct VM_thread* vm_thread_t


Function Documentation

VMEXPORT jlong jthread_thread_init ( JNIEnv jni_env,
jthread  java_thread,
jobject  weak_ref,
hythread_t  dead_thread 
)

VMEXPORT IDATA jthread_create ( JNIEnv jni_env,
jthread  thread,
jthread_start_proc_data_t  attrs 
)

VMEXPORT IDATA jthread_create_with_function ( JNIEnv jni_env,
jthread  thread,
jthread_start_proc_data_t  attrs 
)

VMEXPORT IDATA jthread_attach ( JNIEnv jni_env,
jthread  thread,
jboolean  daemon 
)

VMEXPORT IDATA jthread_detach ( jthread  thread  ) 

VMEXPORT IDATA jthread_java_detach ( jthread  thread  ) 

VMEXPORT IDATA jthread_vm_detach ( vm_thread_t  vm_thread  ) 

VMEXPORT IDATA jthread_yield (  ) 

VMEXPORT IDATA jthread_stop ( jthread  thread  ) 

VMEXPORT IDATA jthread_exception_stop ( jthread  thread,
jobject  throwable 
)

VMEXPORT IDATA jthread_sleep ( jlong  millis,
jint  nanos 
)

VMEXPORT JNIEnv* jthread_get_JNI_env ( jthread  thread  ) 

VMEXPORT IDATA jthread_wait_for_all_nondaemon_threads (  ) 

VMEXPORT jthread jthread_self ( void   ) 

VMEXPORT jlong jthread_get_id ( jthread  thread  ) 

VMEXPORT jthread jthread_get_thread ( jlong  thread_id  ) 

VMEXPORT jthread jthread_get_java_thread ( hythread_t  thread  ) 

VMEXPORT IDATA jthread_set_priority ( jthread  thread,
jint  priority 
)

VMEXPORT jint jthread_get_priority ( jthread  thread  ) 

VMEXPORT IDATA jthread_set_name ( jthread  thread,
jstring  name 
)

Sets the name for the thread.

Parameters:
[in] thread those attribute is set
[in] name thread name
See also:
java.lang.Thread.setName()

VMEXPORT jstring jthread_get_name ( jthread  thread  ) 

Returns the name for the thread.

Parameters:
[in] - thread those attribute is read
See also:
java.lang.Thread.getName()

VMEXPORT IDATA jthread_interrupt ( jthread  thread  ) 

VMEXPORT jboolean jthread_is_interrupted ( jthread  thread  ) 

VMEXPORT IDATA jthread_clear_interrupted ( jthread  thread  ) 

VMEXPORT IDATA jthread_monitor_init ( jobject  mon  ) 

VMEXPORT IDATA jthread_monitor_enter ( jobject  mon  ) 

VMEXPORT IDATA jthread_monitor_try_enter ( jobject  mon  ) 

VMEXPORT IDATA jthread_monitor_exit ( jobject  mon  ) 

VMEXPORT IDATA jthread_monitor_release ( jobject  mon  ) 

VMEXPORT IDATA jthread_monitor_notify ( jobject  mon  ) 

VMEXPORT IDATA jthread_monitor_notify_all ( jobject  mon  ) 

VMEXPORT IDATA jthread_monitor_wait ( jobject  mon  ) 

VMEXPORT IDATA jthread_monitor_timed_wait ( jobject  mon,
jlong  millis,
jint  nanos 
)

VMEXPORT IDATA jthread_park (  ) 

VMEXPORT IDATA jthread_timed_park ( jlong  millis,
jint  nanos 
)

VMEXPORT IDATA jthread_unpark ( jthread  thread  ) 

VMEXPORT IDATA jthread_park_until ( jlong  milis  ) 

VMEXPORT IDATA jthread_suspend ( jobject  thread  ) 

VMEXPORT IDATA jthread_suspend_all ( jvmtiError results,
jint  count,
const jobject thread_list 
)

VMEXPORT IDATA jthread_resume ( jobject  thread  ) 

VMEXPORT IDATA jthread_resume_all ( jvmtiError results,
jint  count,
const jobject thread_list 
)

VMEXPORT IDATA jthread_cancel_all (  ) 


Genereated on Tue Mar 11 19:25:22 2008 by Doxygen.

(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.