Home | History | Annotate | Download | only in vm

Lines Matching refs:Thread

32 All JNI methods must start by changing their thread status to
34 returning to native code. The switch to "running" triggers a thread
87 The spec says, "Local references are only valid in the thread in which
89 one thread to another."
127 Each Thread/JNIEnv points to an IndirectRefTable.
145 * the Thread that can be altered by other threads (e.g. prev/next pointers).
147 static void computeStackSum(Thread* self) {
161 * thread attachment. Another opportunity exists during JNI_OnLoad. Rather
165 static void checkStackSum(Thread* self) {
198 static inline Thread* self(JNIEnv* env) {
199 Thread* envSelf = ((JNIEnvExt*) env)->self;
201 // that we use the correct per-thread indirect reference table.
202 Thread* self = gDvmJni.workAroundAppJniBugs ? dvmThreadSelf() : envSelf;
204 LOGE("JNI ERROR: env->self != thread-self (%p vs. %p); auto-correcting",
213 * We skip the (curiously expensive) thread-local storage lookup on our Thread*.
215 * structures from more than one thread, and things are going to fail
232 Thread* self() {
237 Thread* mSelf;
288 * Find the JNIEnv associated with the current thread.
290 * Currently stored in the Thread struct. Could also just drop this into
291 * thread-local storage.
294 Thread* self = dvmThreadSelf();
302 * Retrieve the ReferenceTable struct for the current thread.
431 * refs table of the current thread.
674 * We only dump the local refs associated with the current thread.
677 Thread* self = dvmThreadSelf();
940 static void logNativeMethodExit(const Method* method, Thread* self, const JValue returnValue)
974 * Track a JNI MonitorEnter in the current thread.
977 * when the thread detaches.
983 static void trackMonitorEnter(Thread* self, Object* obj) {
1007 * Track a JNI MonitorExit in the current thread.
1009 static void trackMonitorExit(Thread* self, Object* obj) {
1023 void dvmReleaseJniMonitors(Thread* self) {
1033 LOGW("Unable to unlock monitor %p at thread detach", *ptr);
1078 * to the current thread.
1112 const Method* method, Thread* self)
1122 void dvmCallJNIMethod(const u4* args, JValue* pResult, const Method* method, Thread* self) {
2573 * outstanding synchronization before the thread exits.
2586 * Throws an IllegalMonitorStateException if the current thread
2603 * Return the JavaVM interface associated with the current thread.
2817 * increment the thread count to prevent a VM exit.
2819 * This could potentially still have problems if a daemon thread calls here
2824 * Remember that some code may call this as a way to find the per-thread
2833 Thread* self = dvmThreadSelf();
2850 LOGV("Refusing to attach thread '%s' -- VM is shutting down",
2901 * Attach the current thread to the VM. If the thread is already attached,
2917 * Dissociate the current thread from the VM.
2920 Thread* self = dvmThreadSelf();
2929 /* detach the thread */
2937 * If current thread is attached to VM, return the associated JNIEnv.
2944 Thread* self = dvmThreadSelf();
2962 * Destroy the VM. This may be called from any thread.
2964 * If the current thread is attached, wait until the current thread is
2965 * the only non-daemon user-level thread. If the current thread is not
2970 * TODO: we don't really deal with the situation where more than one thread
2971 * has called here. One thread wins, the other stays trapped waiting on
2988 Thread* self = dvmThreadSelf();
3002 gDvm.nonDaemonThreadCount--; // remove current thread from count
3331 * "self" will be NULL for the main thread, since the VM hasn't started
3334 JNIEnv* dvmCreateJNIEnv(Thread* self) {
3350 newEnv->self = (Thread*) 0x77777779;
3406 * only be called in "zygote" mode, when we have one thread running.
3415 LOGE("dvmLateEnableCheckedJni: thread has no JNIEnv");
3457 * The current thread becomes the main VM thread. We return immediately,
3548 * Create a JNIEnv for the main thread. We need to have something set up