290
291 private:
292 void Recycle() {
293 // TODO: add stronger asserts ...
294 // _cxq == 0 _succ == NULL _owner == NULL _waiters == 0
295 // _count == 0 EntryList == NULL
296 // _recursions == 0 _WaitSet == NULL
297 assert(((is_busy()|_recursions) == 0), "freeing inuse monitor");
298 _succ = NULL;
299 _EntryList = NULL;
300 _cxq = NULL;
301 _WaitSet = NULL;
302 _recursions = 0;
303 }
304
305 public:
306
307 void* object() const;
308 void* object_addr();
309 void set_object(void* obj);
310 void* cas_set_object(void* obj, void* expected_obj);
311
312 bool check(TRAPS); // true if the thread owns the monitor.
313 void check_slow(TRAPS);
314 void clear();
315 static void sanity_checks(); // public for -XX:+ExecuteInternalVMTests
316 // in PRODUCT for -XX:SyncKnobs=Verbose=1
317 #ifndef PRODUCT
318 void verify();
319 void print();
320 #endif
321
322 void enter(TRAPS);
323 void exit(bool not_suspended, TRAPS);
324 void wait(jlong millis, bool interruptable, TRAPS);
325 void notify(TRAPS);
326 void notifyAll(TRAPS);
327
328 // Use the following at your own risk
329 intptr_t complete_exit(TRAPS);
330 void reenter(intptr_t recursions, TRAPS);
|
290
291 private:
292 void Recycle() {
293 // TODO: add stronger asserts ...
294 // _cxq == 0 _succ == NULL _owner == NULL _waiters == 0
295 // _count == 0 EntryList == NULL
296 // _recursions == 0 _WaitSet == NULL
297 assert(((is_busy()|_recursions) == 0), "freeing inuse monitor");
298 _succ = NULL;
299 _EntryList = NULL;
300 _cxq = NULL;
301 _WaitSet = NULL;
302 _recursions = 0;
303 }
304
305 public:
306
307 void* object() const;
308 void* object_addr();
309 void set_object(void* obj);
310
311 bool check(TRAPS); // true if the thread owns the monitor.
312 void check_slow(TRAPS);
313 void clear();
314 static void sanity_checks(); // public for -XX:+ExecuteInternalVMTests
315 // in PRODUCT for -XX:SyncKnobs=Verbose=1
316 #ifndef PRODUCT
317 void verify();
318 void print();
319 #endif
320
321 void enter(TRAPS);
322 void exit(bool not_suspended, TRAPS);
323 void wait(jlong millis, bool interruptable, TRAPS);
324 void notify(TRAPS);
325 void notifyAll(TRAPS);
326
327 // Use the following at your own risk
328 intptr_t complete_exit(TRAPS);
329 void reenter(intptr_t recursions, TRAPS);
|