thread_private.h File Reference


Classes

struct  HyThreadLibrary
struct  HyThreadGroup
 hythread_group_t pointer to the first element in the thread group More...
struct  HyThreadMonitor
 Fat monitor structure. More...
struct  HyLatch
 Count down latch. More...
struct  HySemaphore
 Semaphore. More...
struct  HyFatLockTable

Defines

#define TRACE(a)
#define DIE(A)
#define RET_ON_ERROR(stat)   if (stat) { return -1; }
#define CONVERT_ERROR(stat)   (stat)
#define FAST_LOCAL_STORAGE_SIZE   10
#define HY_FAT_LOCK_ID_OFFSET   11
#define HY_FAT_LOCK_ID_MASK   0xFFFFF
#define HY_FAT_TABLE_ENTRIES   (16*1024)
#define HY_MAX_FAT_LOCKS   (HY_FAT_LOCK_ID_MASK + 1)
#define HY_MAX_FAT_TABLES   ((HY_MAX_FAT_LOCKS + HY_FAT_TABLE_ENTRIES - 1)/HY_FAT_TABLE_ENTRIES)
#define THREAD_ID_SIZE   16

Typedefs

typedef enum hythread_locktable_state hythread_locktable_state_t
typedef void(*) tm_thread_event_callback_proc (void)
 Thread cancellation, being used at VM shutdown through tmj_cancel_all_threads() method call to terminate all java threads at shutdown.

Enumerations

enum  hythread_locktable_state { HYTHREAD_LOCKTABLE_IDLE, HYTHREAD_LOCKTABLE_READING, HYTHREAD_LOCKTABLE_WRITING }

Functions

IDATA VMCALL hythread_get_group (hythread_group_t *group, hythread_t thread)
 Internal TM functions.
void throw_interrupted_exception (void)
 Auxiliary function to throw java.lang.InterruptedException.
hythread_group_t get_java_thread_group (void)
IDATA VMCALL set_safepoint_callback (hythread_t thread, tm_thread_event_callback_proc callback)
IDATA acquire_start_lock (void)
IDATA release_start_lock (void)
IDATA thread_sleep_impl (I_64 millis, IDATA nanos, IDATA interruptable)
IDATA condvar_wait_impl (hycond_t *cond, hymutex_t *mutex, I_64 ms, IDATA nano, IDATA interruptable)
IDATA monitor_wait_impl (hythread_monitor_t mon_ptr, I_64 ms, IDATA nano, IDATA interruptable)
IDATA thin_monitor_wait_impl (hythread_thin_monitor_t *lockword_ptr, I_64 ms, IDATA nano, IDATA interruptable)
IDATA sem_wait_impl (hysem_t sem, I_64 ms, IDATA nano, IDATA interruptable)
int os_thread_create (osthread_t *phandle, UDATA stacksize, UDATA priority, hythread_wrapper_t func, void *data)
int os_thread_set_priority (osthread_t thread, int priority)
osthread_t os_thread_current ()
int os_thread_free (osthread_t os_thread)
void os_thread_exit (IDATA status)
int os_thread_join (osthread_t os_thread)
int os_get_thread_times (osthread_t os_thread, int64 *pkernel, int64 *puser)
int os_cond_timedwait (hycond_t *cond, hymutex_t *mutex, I_64 ms, IDATA nano)
UDATA os_get_foreign_thread_stack_size ()

Variables

hythread_group_t TM_DEFAULT_GROUP
int16 tm_tls_capacity
 current capacity of the thread local storage
int16 tm_tls_size
 current capacity of the thread local storage
hythread_group_t group_list
IDATA groups_count
apr_pool_t * TM_POOL
apr_threadkey_t * TM_THREAD_KEY
int max_group_index
HyFatLockTablelock_table


Define Documentation

#define TRACE (  ) 

#define DIE (  ) 

#define RET_ON_ERROR ( stat   )     if (stat) { return -1; }

#define CONVERT_ERROR ( stat   )     (stat)

#define FAST_LOCAL_STORAGE_SIZE   10

#define HY_FAT_LOCK_ID_OFFSET   11

#define HY_FAT_LOCK_ID_MASK   0xFFFFF

#define HY_FAT_TABLE_ENTRIES   (16*1024)

#define HY_MAX_FAT_LOCKS   (HY_FAT_LOCK_ID_MASK + 1)

#define HY_MAX_FAT_TABLES   ((HY_MAX_FAT_LOCKS + HY_FAT_TABLE_ENTRIES - 1)/HY_FAT_TABLE_ENTRIES)

#define THREAD_ID_SIZE   16


Typedef Documentation

typedef enum hythread_locktable_state hythread_locktable_state_t

typedef void(*) tm_thread_event_callback_proc(void)

Thread cancellation, being used at VM shutdown through tmj_cancel_all_threads() method call to terminate all java threads at shutdown.


Enumeration Type Documentation

enum hythread_locktable_state

Enumerator:
HYTHREAD_LOCKTABLE_IDLE 
HYTHREAD_LOCKTABLE_READING 
HYTHREAD_LOCKTABLE_WRITING 


Function Documentation

IDATA VMCALL hythread_get_group ( hythread_group_t group,
hythread_t  thread 
)

Internal TM functions.

void throw_interrupted_exception ( void   ) 

Auxiliary function to throw java.lang.InterruptedException.

hythread_group_t get_java_thread_group ( void   ) 

IDATA VMCALL set_safepoint_callback ( hythread_t  thread,
tm_thread_event_callback_proc  callback 
)

IDATA acquire_start_lock ( void   ) 

IDATA release_start_lock ( void   ) 

IDATA thread_sleep_impl ( I_64  millis,
IDATA  nanos,
IDATA  interruptable 
)

IDATA condvar_wait_impl ( hycond_t *  cond,
hymutex_t *  mutex,
I_64  ms,
IDATA  nano,
IDATA  interruptable 
)

IDATA monitor_wait_impl ( hythread_monitor_t  mon_ptr,
I_64  ms,
IDATA  nano,
IDATA  interruptable 
)

IDATA thin_monitor_wait_impl ( hythread_thin_monitor_t lockword_ptr,
I_64  ms,
IDATA  nano,
IDATA  interruptable 
)

IDATA sem_wait_impl ( hysem_t  sem,
I_64  ms,
IDATA  nano,
IDATA  interruptable 
)

int os_thread_create ( osthread_t *  phandle,
UDATA  stacksize,
UDATA  priority,
hythread_wrapper_t  func,
void *  data 
)

int os_thread_set_priority ( osthread_t  thread,
int  priority 
)

osthread_t os_thread_current (  ) 

int os_thread_free ( osthread_t  os_thread  ) 

void os_thread_exit ( IDATA  status  ) 

int os_thread_join ( osthread_t  os_thread  ) 

int os_get_thread_times ( osthread_t  os_thread,
int64 *  pkernel,
int64 *  puser 
)

int os_cond_timedwait ( hycond_t *  cond,
hymutex_t *  mutex,
I_64  ms,
IDATA  nano 
)

UDATA os_get_foreign_thread_stack_size (  ) 


Variable Documentation

hythread_group_t TM_DEFAULT_GROUP

int16 tm_tls_capacity

current capacity of the thread local storage

int16 tm_tls_size

current capacity of the thread local storage

hythread_group_t group_list

IDATA groups_count

apr_pool_t* TM_POOL

apr_threadkey_t* TM_THREAD_KEY

int max_group_index

HyFatLockTable* lock_table


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

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