HyThread Struct Reference

#include <hythread_ext.h>

List of all members.


Detailed Description

Native thread control structure.


Public Attributes

void * reserved
uint32 request
 Number of requests made for this thread, it includes both suspend requests and safe point callback requests.
int16 disable_count
 Field indicating that thread can safely be suspended.
hythread_group_t group
 Group for this thread.
void * thread_local_storage [10]
 Array representing thread local storage.
hythread_library_t library
 Each thread keeps a pointer to the library it belongs to.
uint32 suspend_count
 Number of suspend requests made for this thread.
hythread_event_callback_proc safepoint_callback
 Function to be executed at safepoint upon thread resume.
hysem_t resume_event
 Event used to notify suspended thread that it needs to wake up.
hythread_t next
 Points to the next thread within the group.
hythread_t prev
 Points to the last thread within the group.
osthread_t os_handle
 Handle to OS thread.
hymutex_t mutex
 Thread local lock, used to serialize thread state;.
hythread_monitor_t monitor
 Monitor used to implement wait function for sleep/park;.
hycond_t * current_condition
 Current conditional variable thread is waiting on (used for interrupting).
IDATA state
 Thread state.
int priority
 Hint for scheduler about thread priority.
char java_status
 Flag illustrates that java thread status.
char need_to_free
 Release indicator.
UDATA stacksize
 Size of thread's stack, set on creation.
uint32 interrupted
 Flag of interruption.
hythread_monitor_t waited_monitor
 Monitor this thread is waiting on now.
IDATA thread_id
 ID for this thread.


Member Data Documentation

void* HyThread.reserved

uint32 HyThread.request

Number of requests made for this thread, it includes both suspend requests and safe point callback requests.

The field is modified by atomic operations.

Increment in functions: 1. send_suspend_request()

Decrement in functions: 1. hythread_resume()

int16 HyThread.disable_count

Field indicating that thread can safely be suspended.

Safe suspension is enabled on value 0.

The disable_count is increased/decreaded in hythread_suspend_disable()/hythread_suspend_enable() function for current thread only.

Also disable_count could be reset to value 0 and restored in hythread_set_suspend_disable()/hythread_set_suspend_disable() function for current thread only.

Function hythread_exception_safe_point() sets disable_count to value 1 before safe point callback function calling and restores it after the call.

Function thread_safe_point_impl() sets disable_count to value 0 before entering to the safe point and restores it after exitting.

hythread_group_t HyThread.group

Group for this thread.

Different groups are needed in order to be able to quickly iterate over the specific group. Examples are: Java threads, GC private threads. Equal to the address of the head of the list of threads for this group.

void* HyThread.thread_local_storage[10]

Array representing thread local storage.

hythread_library_t HyThread.library

Each thread keeps a pointer to the library it belongs to.

uint32 HyThread.suspend_count

Number of suspend requests made for this thread.

The field is modified by atomic operations.

After increment/decrement of suspend_count, request field should be incremented/decremented too.

hythread_event_callback_proc HyThread.safepoint_callback

Function to be executed at safepoint upon thread resume.

Field is set in hythread_set_safepoint_callback() function and reset hythread_exception_safe_point() function.

After set/reset of safepoint_callback, request field should be incremented/decremented too.

hysem_t HyThread.resume_event

Event used to notify suspended thread that it needs to wake up.

hythread_t HyThread.next

Points to the next thread within the group.

hythread_t HyThread.prev

Points to the last thread within the group.

osthread_t HyThread.os_handle

Handle to OS thread.

hymutex_t HyThread.mutex

Thread local lock, used to serialize thread state;.

hythread_monitor_t HyThread.monitor

Monitor used to implement wait function for sleep/park;.

hycond_t* HyThread.current_condition

Current conditional variable thread is waiting on (used for interrupting).

IDATA HyThread.state

Thread state.

Holds thread state flags as defined in JVMTI specification, plus some additional flags. See JVMTI Specification for more details.

int HyThread.priority

Hint for scheduler about thread priority.

char HyThread.java_status

Flag illustrates that java thread status.

char HyThread.need_to_free

Release indicator.

UDATA HyThread.stacksize

Size of thread's stack, set on creation.

uint32 HyThread.interrupted

Flag of interruption.

hythread_monitor_t HyThread.waited_monitor

Monitor this thread is waiting on now.

IDATA HyThread.thread_id

ID for this thread.

The maximum number of threads is governed by the size of lockword record.


The documentation for this struct was generated from the following file:

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

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