thread_manager.h File Reference


Classes

struct  JVMTIThread
 Java-specific context that is attached to tm_thread control structure by Java layer. More...
struct  VM_thread
struct  jthread_start_proc_data
 Java thread creation attributes. More...

Defines

#define GC_BYTES_IN_THREAD_LOCAL   (20 * sizeof(void *))
#define CONVERT_ERROR(stat)   (stat)
#define TM_JVMTI_MAX_BUFFER_SIZE   500
#define TM_INITIAL_OWNED_MONITOR_SIZE   32

Functions

VMEXPORT jint vm_attach (JavaVM *java_vm, JNIEnv **p_jni_env)
 Registrates current thread in VM, so it could execute Java.
VMEXPORT jint vm_detach (jobject java_thread)
 Frees java related resources before thread exit.
VMEXPORT void jthread_set_tm_data (jobject thread, void *data_ptr)
 Stores a pointer to TM-specific data in the java.lang.Thread object.
VMEXPORT void * jthread_get_tm_data (jobject thread)
 Retrieves TM-specific data from the java.lang.Thread object.
VMEXPORT int vm_objects_are_equal (jobject obj1, jobject obj2)
 vm_objects_are_equal
obj1 jobject
obj2 jobject

hy_inline vm_thread_t jthread_self_vm_thread ()
 Gets VM_thread from native thread.
hy_inline vm_thread_t jthread_get_vm_thread (hythread_t native)
 Gets VM_thread from a given native thread.
hy_inline vm_thread_t jthread_self_vm_thread_unsafe ()
 Gets unsafe VM_thread from native thread.
hy_inline vm_thread_t jthread_get_vm_thread_unsafe (hythread_t native)
 Gets unsafe VM_thread from a given native thread.
hy_inline hythread_t jthread_get_native_thread (jobject java_thread)
 Gets native thread associated with a given Java thread.
hy_inline vm_thread_t jthread_get_vm_thread_from_java (jobject java_thread)
 Gets VM_thread associated with a given Java thread.


Define Documentation

#define GC_BYTES_IN_THREAD_LOCAL   (20 * sizeof(void *))

#define CONVERT_ERROR ( stat   )     (stat)

#define TM_JVMTI_MAX_BUFFER_SIZE   500

#define TM_INITIAL_OWNED_MONITOR_SIZE   32


Function Documentation

VMEXPORT jint vm_attach ( JavaVM java_vm,
JNIEnv **  p_jni_env 
)

Registrates current thread in VM, so it could execute Java.

Parameters:
[in] java_vm - current thread will be attached to the specified VM
[out] p_jni_env - will point to JNI environment assocciated with the thread

VMEXPORT jint vm_detach ( jobject  java_thread  ) 

Frees java related resources before thread exit.

VMEXPORT void jthread_set_tm_data ( jobject  thread,
void *  data_ptr 
)

Stores a pointer to TM-specific data in the java.lang.Thread object.

A typical implementation may store a pointer within a private non-static field of Thread.

Parameters:
[in] thread - a java.lang.Thread object those private field is going to be used for data storage
[in] data_ptr - a pointer to data to be stored

VMEXPORT void* jthread_get_tm_data ( jobject  thread  ) 

Retrieves TM-specific data from the java.lang.Thread object.

Parameters:
[in] thread - a thread
Returns:
TM-specific data previously stored, or NULL, if there are none.

VMEXPORT int vm_objects_are_equal ( jobject  obj1,
jobject  obj2 
)

vm_objects_are_equal
obj1 jobject
obj2 jobject

Returns:
int

hy_inline vm_thread_t jthread_self_vm_thread (  ) 

Gets VM_thread from native thread.

hy_inline vm_thread_t jthread_get_vm_thread ( hythread_t  native  ) 

Gets VM_thread from a given native thread.

hy_inline vm_thread_t jthread_self_vm_thread_unsafe (  ) 

Gets unsafe VM_thread from native thread.

VM_thread could be not initialized.

hy_inline vm_thread_t jthread_get_vm_thread_unsafe ( hythread_t  native  ) 

Gets unsafe VM_thread from a given native thread.

VM_thread could be not initialized.

hy_inline hythread_t jthread_get_native_thread ( jobject  java_thread  ) 

Gets native thread associated with a given Java thread.

Returns:
native thread

hy_inline vm_thread_t jthread_get_vm_thread_from_java ( jobject  java_thread  ) 

Gets VM_thread associated with a given Java thread.

Returns:
pointer to VM_thread or NULL


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

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