Home | History | Annotate | Download | only in native

Lines Matching refs:thread

25 #include "thread.h"
43 Thread* thread = Thread::FromManagedThread(soa, java_thread);
44 return (thread != NULL) ? thread->IsInterrupted() : JNI_FALSE;
49 Thread::CreateNativeThread(env, java_thread, stack_size, daemon == JNI_TRUE);
53 // Ordinals from Java's Thread.State.
64 Thread* thread = Thread::FromManagedThread(soa, java_thread);
65 if (thread != NULL) {
66 internal_thread_state = thread->GetState();
92 LOG(ERROR) << "Unexpected thread state: " << internal_thread_state;
104 Thread* thread = Thread::FromManagedThread(soa, java_thread);
105 return thread->HoldsLock(object);
111 Thread* thread = Thread::FromManagedThread(soa, java_thread);
112 if (thread != NULL) {
113 thread->Interrupt(soa.Self());
119 Thread* self;
128 // Suspend thread to avoid it from killing itself while we set its name. We don't just hold the
129 // thread list lock to avoid this, as setting the thread name causes mutator to lock/unlock
133 // Take suspend thread lock to avoid races with threads trying to suspend this one.
134 Thread* thread;
137 thread = thread_list->SuspendThreadByPeer(peer, true, false, &timed_out);
139 if (thread != NULL) {
142 thread->SetThreadName(name.c_str());
144 thread_list->Resume(thread, false);
146 LOG(ERROR) << "Trying to set thread name to '" << name.c_str() << "' failed as the thread "
152 * Alter the priority of the specified thread. "new_priority" will range
153 * from Thread.MIN_PRIORITY to Thread.MAX_PRIORITY (1-10), with "normal"
154 * threads at Thread.NORM_PRIORITY (5).
159 Thread* thread = Thread::FromManagedThread(soa, java_thread);
160 if (thread != NULL) {
161 thread->SetNativePriority(new_priority);
168 Monitor::Wait(Thread::Current(), lock, ms, ns, true, kSleeping);
172 * Causes the thread to temporarily pause and allow other threads to execute.
182 NATIVE_METHOD(Thread, currentThread, "!()Ljava/lang/Thread;"),
183 NATIVE_METHOD(Thread, interrupted, "!()Z"),
184 NATIVE_METHOD(Thread, isInterrupted, "!()Z"),
185 NATIVE_METHOD(Thread, nativeCreate, "(Ljava/lang/Thread;JZ)V"),
186 NATIVE_METHOD(Thread, nativeGetStatus, "(Z)I"),
187 NATIVE_METHOD(Thread, nativeHoldsLock, "(Ljava/lang/Object;)Z"),
188 NATIVE_METHOD(Thread, nativeInterrupt, "!()V"),
189 NATIVE_METHOD(Thread, nativeSetName, "(Ljava/lang/String;)V"),
190 NATIVE_METHOD(Thread, nativeSetPriority, "(I)V"),
191 NATIVE_METHOD(Thread, sleep, "!(Ljava/lang/Object;JI)V"),
192 NATIVE_METHOD(Thread, yield, "()V"),
196 REGISTER_NATIVE_METHODS("java/lang/Thread");