63 } InflateCause; |
63 } InflateCause; |
64 |
64 |
65 // exit must be implemented non-blocking, since the compiler cannot easily handle |
65 // exit must be implemented non-blocking, since the compiler cannot easily handle |
66 // deoptimization at monitor exit. Hence, it does not take a Handle argument. |
66 // deoptimization at monitor exit. Hence, it does not take a Handle argument. |
67 |
67 |
68 // This is full version of monitor enter and exit. I choose not |
68 // This is the "slow path" version of monitor enter and exit. |
69 // to use enter() and exit() in order to make sure user be ware |
69 static void enter(Handle obj, BasicLock* lock, TRAPS); |
70 // of the performance and semantics difference. They are normally |
70 static void exit(oop obj, BasicLock* lock, Thread* THREAD); |
71 // used by ObjectLocker etc. The interpreter and compiler use |
|
72 // assembly copies of these routines. Please keep them synchronized. |
|
73 // |
|
74 // attempt_rebias flag is used by UseBiasedLocking implementation |
|
75 static void fast_enter(Handle obj, BasicLock* lock, bool attempt_rebias, |
|
76 TRAPS); |
|
77 static void fast_exit(oop obj, BasicLock* lock, Thread* THREAD); |
|
78 |
|
79 // WARNING: They are ONLY used to handle the slow cases. They should |
|
80 // only be used when the fast cases failed. Use of these functions |
|
81 // without previous fast case check may cause fatal error. |
|
82 static void slow_enter(Handle obj, BasicLock* lock, TRAPS); |
|
83 static void slow_exit(oop obj, BasicLock* lock, Thread* THREAD); |
|
84 |
71 |
85 // Used only to handle jni locks or other unmatched monitor enter/exit |
72 // Used only to handle jni locks or other unmatched monitor enter/exit |
86 // Internally they will use heavy weight monitor. |
73 // Internally they will use heavy weight monitor. |
87 static void jni_enter(Handle obj, TRAPS); |
74 static void jni_enter(Handle obj, TRAPS); |
88 static void jni_exit(oop obj, Thread* THREAD); |
75 static void jni_exit(oop obj, Thread* THREAD); |