CACAO
|
Go to the source code of this file.
Data Structures | |
struct | threadobject |
Macros | |
#define | DEBUGTHREADS(message, thread) |
#define | TRACEJAVACALLINDENT (THREADOBJECT->tracejavacallindent) |
#define | TRACEJAVACALLCOUNT (THREADOBJECT->tracejavacallcount) |
#define | FILTERVERBOSECALLCTR (THREADOBJECT->filterverbosecallctr) |
#define | THREAD_NATIVEWORLD_ENTER /*nop*/ |
#define | THREAD_NATIVEWORLD_EXIT /*nop*/ |
Enumerations | |
enum | ThreadState { THREAD_STATE_NEW = 0, THREAD_STATE_RUNNABLE = 1, THREAD_STATE_BLOCKED = 2, THREAD_STATE_WAITING = 3, THREAD_STATE_TIMED_WAITING = 4, THREAD_STATE_TERMINATED = 5, THREAD_STATE_PARKED = 6, THREAD_STATE_TIMED_PARKED = 7 } |
enum | ThreadFlag { THREAD_FLAG_JAVA = 0x01, THREAD_FLAG_INTERNAL = 0x02, THREAD_FLAG_DAEMON = 0x04, THREAD_FLAG_IN_NATIVE = 0x08 } |
enum | SuspendReason { SUSPEND_REASON_NONE = 0, SUSPEND_REASON_JAVA = 1, SUSPEND_REASON_STOPWORLD = 2, SUSPEND_REASON_DUMP = 3, SUSPEND_REASON_JVMTI = 4 } |
enum | ThreadPriority { MIN_PRIORITY = 1, NORM_PRIORITY = 5, MAX_PRIORITY = 10 } |
#define DEBUGTHREADS | ( | message, | |
thread | |||
) |
Definition at line 166 of file thread.hpp.
#define FILTERVERBOSECALLCTR (THREADOBJECT->filterverbosecallctr) |
Definition at line 198 of file thread.hpp.
#define THREAD_NATIVEWORLD_ENTER /*nop*/ |
Definition at line 208 of file thread.hpp.
#define THREAD_NATIVEWORLD_EXIT /*nop*/ |
Definition at line 209 of file thread.hpp.
#define TRACEJAVACALLCOUNT (THREADOBJECT->tracejavacallcount) |
Definition at line 191 of file thread.hpp.
#define TRACEJAVACALLINDENT (THREADOBJECT->tracejavacallindent) |
Definition at line 190 of file thread.hpp.
enum SuspendReason |
Enumerator | |
---|---|
SUSPEND_REASON_NONE | |
SUSPEND_REASON_JAVA | |
SUSPEND_REASON_STOPWORLD | |
SUSPEND_REASON_DUMP | |
SUSPEND_REASON_JVMTI |
Definition at line 65 of file thread.hpp.
enum ThreadFlag |
Enumerator | |
---|---|
THREAD_FLAG_JAVA | |
THREAD_FLAG_INTERNAL | |
THREAD_FLAG_DAEMON | |
THREAD_FLAG_IN_NATIVE |
Definition at line 58 of file thread.hpp.
enum ThreadPriority |
Enumerator | |
---|---|
MIN_PRIORITY | |
NORM_PRIORITY | |
MAX_PRIORITY |
Definition at line 75 of file thread.hpp.
enum ThreadState |
Enumerator | |
---|---|
THREAD_STATE_NEW | |
THREAD_STATE_RUNNABLE | |
THREAD_STATE_BLOCKED | |
THREAD_STATE_WAITING | |
THREAD_STATE_TIMED_WAITING | |
THREAD_STATE_TERMINATED | |
THREAD_STATE_PARKED | |
THREAD_STATE_TIMED_PARKED |
Definition at line 47 of file thread.hpp.
|
inlinestatic |
Definition at line 243 of file thread.hpp.
bool thread_attach_current_external_thread | ( | JavaVMAttachArgs * | vm_aargs, |
bool | isdaemon | ||
) |
Attaches the current external thread to the VM.
This function is called by JNI's AttachCurrentThread.
vm_aargs | Attach arguments. |
isdaemon | true if the attached thread should be a daemon thread. |
Definition at line 584 of file thread.cpp.
bool thread_attach_current_thread | ( | JavaVMAttachArgs * | vm_aargs, |
bool | isdaemon | ||
) |
Attaches the current thread to the VM.
vm_aargs | Attach arguments. |
isdaemon | true if the attached thread should be a daemon thread. |
Definition at line 495 of file thread.cpp.
|
inlinestatic |
Definition at line 301 of file thread.hpp.
bool thread_detach_current_external_thread | ( | void | ) |
Detaches the current external thread from the VM.
This function is called by JNI's DetachCurrentThread.
Definition at line 603 of file thread.cpp.
bool thread_detach_current_thread | ( | void | ) |
Detaches the current thread from the VM.
Definition at line 86 of file thread-none.cpp.
void thread_fprint_name | ( | threadobject * | t, |
FILE * | stream | ||
) |
Definition at line 630 of file thread.cpp.
void thread_free | ( | threadobject * | t | ) |
Definition at line 371 of file thread.cpp.
|
inlinestatic |
|
inlinestatic |
Definition at line 226 of file thread.hpp.
threadobject* thread_get_thread | ( | java_handle_t * | h | ) |
Definition at line 874 of file thread.cpp.
int thread_handle_get_state | ( | java_handle_t * | th | ) |
Definition at line 1012 of file thread.cpp.
void thread_handle_interrupt | ( | java_handle_t * | th | ) |
Definition at line 995 of file thread.cpp.
bool thread_handle_is_interrupted | ( | java_handle_t * | th | ) |
Definition at line 981 of file thread.cpp.
void thread_handle_set_priority | ( | java_handle_t * | th, |
int | |||
) |
Definition at line 964 of file thread.cpp.
|
inlinestatic |
Definition at line 262 of file thread.hpp.
|
inlinestatic |
Definition at line 285 of file thread.hpp.
bool thread_is_interrupted | ( | threadobject * | t | ) |
Definition at line 926 of file thread.cpp.
void thread_print_info | ( | threadobject * | t | ) |
Definition at line 650 of file thread.cpp.
void thread_set_interrupted | ( | threadobject * | t, |
bool | interrupted | ||
) |
Definition at line 949 of file thread.cpp.
void thread_set_state_parked | ( | threadobject * | t | ) |
Definition at line 812 of file thread.cpp.
void thread_set_state_runnable | ( | threadobject * | t | ) |
Definition at line 754 of file thread.cpp.
void thread_set_state_terminated | ( | threadobject * | t | ) |
Definition at line 848 of file thread.cpp.
void thread_set_state_timed_parked | ( | threadobject * | t | ) |
Definition at line 831 of file thread.cpp.
void thread_set_state_timed_waiting | ( | threadobject * | t | ) |
Definition at line 793 of file thread.cpp.
void thread_set_state_waiting | ( | threadobject * | t | ) |
Definition at line 773 of file thread.cpp.
|
static |
Definition at line 313 of file thread.hpp.
intptr_t threads_get_current_tid | ( | void | ) |
Definition at line 722 of file thread.cpp.
intptr_t threads_get_tid | ( | threadobject * | ) |
Definition at line 392 of file thread-none.cpp.
void threads_impl_clear_heap_pointers | ( | threadobject * | t | ) |
Definition at line 239 of file thread-none.cpp.
Definition at line 58 of file thread-none.cpp.
Definition at line 52 of file thread-none.cpp.
void threads_impl_thread_clear | ( | threadobject * | t | ) |
Definition at line 258 of file thread-none.cpp.
void threads_impl_thread_reuse | ( | threadobject * | t | ) |
Definition at line 298 of file thread-none.cpp.
void threads_impl_thread_start | ( | threadobject * | thread, |
functionptr | f | ||
) |
Definition at line 64 of file thread-none.cpp.
Definition at line 164 of file thread.cpp.
Definition at line 253 of file thread-none.cpp.
void threads_park | ( | bool | absolute, |
int64_t | nanos | ||
) |
Park the current thread for the specified amount of time or until a specified deadline.
absolute | Is the time in nanos a deadline or a duration? |
nanos | Nanoseconds to park (absolute=false) or deadline in milliseconds (absolute=true) |
Definition at line 373 of file thread-none.cpp.
Definition at line 84 of file thread.cpp.
bool threads_resume_thread | ( | threadobject * | thread, |
SuspendReason | reason | ||
) |
Resumes execution of the passed thread.
thread | The thread to be resumed. |
reason | Reason for suspending the given thread. |
Definition at line 220 of file thread-none.cpp.
|
inlinestatic |
Definition at line 318 of file thread.hpp.
void threads_set_thread_priority | ( | threadobject * | t, |
int | priority | ||
) |
Definition at line 77 of file thread-none.cpp.
void threads_sleep | ( | int64_t | millis, |
int32_t | nanos | ||
) |
Sleep the current thread for the specified amount of time.
millis | Milliseconds to sleep. |
nanos | Nanoseconds to sleep. |
Definition at line 320 of file thread-none.cpp.
void threads_start_thread | ( | threadobject * | thread, |
functionptr | function | ||
) |
void threads_suspend_ack | ( | ) |
Acknowledges the suspension of the current thread.
Definition at line 248 of file thread-none.cpp.
bool threads_suspend_thread | ( | threadobject * | thread, |
SuspendReason | reason | ||
) |
Suspend the passed thread.
Execution of that thread stops until the thread is explicitly resumed again.
thread | The thread to be suspended. |
reason | Reason for suspending the given thread. |
Definition at line 194 of file thread-none.cpp.
void threads_thread_interrupt | ( | threadobject * | thread | ) |
Definition at line 305 of file thread-none.cpp.
bool threads_thread_is_alive | ( | threadobject * | t | ) |
Definition at line 886 of file thread.cpp.
void threads_thread_start | ( | java_handle_t * | object | ) |
Definition at line 445 of file thread.cpp.
bool threads_thread_start_internal | ( | Utf8String | name, |
functionptr | f | ||
) |
Definition at line 402 of file thread.cpp.
void threads_unpark | ( | threadobject * | t | ) |
Unpark the specified thread.
t | The thread to unpark. |
Definition at line 380 of file thread-none.cpp.
void threads_wait_with_timeout_relative | ( | threadobject * | t, |
s8 | millis, | ||
s4 | nanos | ||
) |
Definition at line 362 of file thread-none.cpp.
Definition at line 386 of file thread-none.cpp.