Home | History | Annotate | Download | only in vm

Lines Matching refs:Thread

18  * VM thread support.
53 THREAD_STARTING = 6, /* started, not yet on thread list */
59 /* thread priorities, from java.lang.Thread */
101 * Our per-thread data.
105 struct Thread {
109 * element in Thread.
118 * be located towards the beginning of the Thread structure for
124 * a count of the number of times the thread has been suspended. When
125 * the count drops to zero, the thread resumes.
161 /* thread handle, as reported by pthread_self() */
225 * Thread's current status. Can only be changed by the thread itself
230 /* thread ID, only useful under Linux */
236 /* the java/lang/Thread that we are associated with */
239 /* the JNIEnv pointer associated with this thread */
260 /* thread "interrupted" status; stays raised until queried or thrown */
264 /* links to the next thread in the wait set this thread is part of */
265 struct Thread* waitNext;
271 * Set to true when the thread is in the process of throwing an
276 /* links to rest of thread list; grab global lock before traversing */
277 struct Thread* prev;
278 struct Thread* next;
280 /* used by threadExitCheck when a thread exits without detaching */
286 /* base time for per-thread CPU timing (used by method profiling) */
308 /* start point for an internal thread; mimics pthread args */
311 /* args for internal thread creation */
320 volatile Thread** pThread;
332 * Get our Thread* from TLS.
334 * Returns NULL if this isn't a thread that the VM is aware of.
336 Thread* dvmThreadSelf(void);
338 /* grab the thread list global lock */
339 void dvmLockThreadList(Thread* self);
340 /* try to grab the thread list global lock */
342 /* release the thread list global lock */
346 * Thread suspend/resume, used by the GC and debugger.
364 void dvmSuspendThread(Thread* thread);
366 void dvmResumeThread(Thread* thread);
374 bool dvmIsSuspended(const Thread* thread);
377 * Wait until a thread has suspended. (Used by debugger support.)
379 void dvmWaitForSuspend(Thread* thread);
385 extern "C" bool dvmCheckSuspendPending(Thread* self);
391 INLINE bool dvmCheckSuspendQuick(Thread* self) {
396 * Used when changing thread state. Threads may only change their own.
407 ThreadStatus dvmChangeStatus(Thread* self, ThreadStatus newStatus);
484 * Create a thread as a result of java.lang.Thread.start().
489 * Create a thread internal to the VM. It's visible to interpreted code,
490 * but found in the "system" thread group rather than "main".
496 * Attach or detach the current thread from the VM.
502 * Get the "main" or "system" thread group.
508 * Given a java/lang/VMThread object, return our Thread.
510 Thread* dvmGetThreadFromThreadObject(Object* vmThreadObj);
513 * Given a pthread handle, return the associated Thread*.
514 * Caller must hold the thread list lock.
516 * Returns NULL if the thread was not found.
518 Thread* dvmGetThreadByHandle(pthread_t handle);
521 * Given a thread ID, return the associated Thread*.
522 * Caller must hold the thread list lock.
524 * Returns NULL if the thread was not found.
526 Thread* dvmGetThreadByThreadId(u4 threadId);
529 * Sleep in a thread. Returns when the sleep timer returns or the thread
535 * Get the name of a thread.
537 * For correctness, the caller should hold the thread list lock to ensure
538 * that the thread doesn't go away mid-call.
540 std::string dvmGetThreadName(Thread* thread);
548 * Return true if a thread is on the internal list. If it is, the
549 * thread is part of the GC's root set.
551 bool dvmIsOnThreadList(const Thread* thread);
556 INLINE JNIEnv* dvmGetThreadJNIEnv(Thread* self) { return self->jniEnv; }
557 INLINE void dvmSetThreadJNIEnv(Thread* self, JNIEnv* env) { self->jniEnv = env;}
562 void dvmChangeThreadPriority(Thread* thread, int newPriority);
564 /* "change flags" values for raise/reset thread priority calls */
569 * If necessary, raise the thread's priority to nice=0 cgroup=fg.
573 int dvmRaiseThreadPriorityIfNeeded(Thread* thread, int* pSavedThreadPrio,
577 * Drop the thread priority to what it was before an earlier call to
580 void dvmResetThreadPriority(Thread* thread, int changeFlags,
584 * Debug: dump information about a single thread.
586 void dvmDumpThread(Thread* thread, bool isRunning);
587 void dvmDumpThreadEx(const DebugOutputTarget* target, Thread* thread,
597 * Debug: kill a thread to get a debuggerd stack trace. Leaves the VM
600 void dvmNukeThread(Thread* thread);