55 static void fast_enter(Handle obj, BasicLock* lock, bool attempt_rebias,
56 TRAPS);
57 static void fast_exit(oop obj, BasicLock* lock, Thread* THREAD);
58
59 // WARNING: They are ONLY used to handle the slow cases. They should
60 // only be used when the fast cases failed. Use of these functions
61 // without previous fast case check may cause fatal error.
62 static void slow_enter(Handle obj, BasicLock* lock, TRAPS);
63 static void slow_exit(oop obj, BasicLock* lock, Thread* THREAD);
64
65 // Used only to handle jni locks or other unmatched monitor enter/exit
66 // Internally they will use heavy weight monitor.
67 static void jni_enter(Handle obj, TRAPS);
68 static void jni_exit(oop obj, Thread* THREAD);
69
70 // Handle all interpreter, compiler and jni cases
71 static int wait(Handle obj, jlong millis, TRAPS);
72 static void notify(Handle obj, TRAPS);
73 static void notifyall(Handle obj, TRAPS);
74
75 static bool quick_enter(oop obj, Thread* Self, BasicLock* Lock);
76
77 // Special internal-use-only method for use by JVM infrastructure
78 // that needs to wait() on a java-level object but that can't risk
79 // throwing unexpected InterruptedExecutionExceptions.
80 static void waitUninterruptibly(Handle obj, jlong Millis, Thread * THREAD);
81
82 // used by classloading to free classloader object lock,
83 // wait on an internal lock, and reclaim original lock
84 // with original recursion count
85 static intptr_t complete_exit(Handle obj, TRAPS);
86 static void reenter (Handle obj, intptr_t recursion, TRAPS);
87
88 // thread-specific and global objectMonitor free list accessors
89 static void verifyInUse(Thread * Self);
90 static ObjectMonitor * omAlloc(Thread * Self);
91 static void omRelease(Thread * Self, ObjectMonitor * m,
92 bool FromPerThreadAlloc);
93 static void omFlush(Thread * Self);
94
|
55 static void fast_enter(Handle obj, BasicLock* lock, bool attempt_rebias,
56 TRAPS);
57 static void fast_exit(oop obj, BasicLock* lock, Thread* THREAD);
58
59 // WARNING: They are ONLY used to handle the slow cases. They should
60 // only be used when the fast cases failed. Use of these functions
61 // without previous fast case check may cause fatal error.
62 static void slow_enter(Handle obj, BasicLock* lock, TRAPS);
63 static void slow_exit(oop obj, BasicLock* lock, Thread* THREAD);
64
65 // Used only to handle jni locks or other unmatched monitor enter/exit
66 // Internally they will use heavy weight monitor.
67 static void jni_enter(Handle obj, TRAPS);
68 static void jni_exit(oop obj, Thread* THREAD);
69
70 // Handle all interpreter, compiler and jni cases
71 static int wait(Handle obj, jlong millis, TRAPS);
72 static void notify(Handle obj, TRAPS);
73 static void notifyall(Handle obj, TRAPS);
74
75 static bool quick_notify(oopDesc* obj, Thread* Self, bool All);
76 static bool quick_enter(oop obj, Thread* Self, BasicLock* Lock);
77
78 // Special internal-use-only method for use by JVM infrastructure
79 // that needs to wait() on a java-level object but that can't risk
80 // throwing unexpected InterruptedExecutionExceptions.
81 static void waitUninterruptibly(Handle obj, jlong Millis, Thread * THREAD);
82
83 // used by classloading to free classloader object lock,
84 // wait on an internal lock, and reclaim original lock
85 // with original recursion count
86 static intptr_t complete_exit(Handle obj, TRAPS);
87 static void reenter (Handle obj, intptr_t recursion, TRAPS);
88
89 // thread-specific and global objectMonitor free list accessors
90 static void verifyInUse(Thread * Self);
91 static ObjectMonitor * omAlloc(Thread * Self);
92 static void omRelease(Thread * Self, ObjectMonitor * m,
93 bool FromPerThreadAlloc);
94 static void omFlush(Thread * Self);
95
|