Lines Matching defs:Self

354 int Monitor::TrySpin (Thread * const Self) {
403 if (Self != NULL) {
404 jint rv = Self->rng[0] ;
409 Self->rng[0] = rv ;
456 void Monitor::ILock (Thread * Self) {
457 assert (_OnDeck != Self->_MutexEvent, "invariant") ;
465 ParkEvent * const ESelf = Self->_MutexEvent ;
470 if (TrySpin (Self)) goto Exeunt ;
473 // Either Enqueue Self on cxq or acquire the outer lock.
479 if ((NativeMonitorFlags & 32) && CASPTR (&_OnDeck, NULL, UNS(Self)) == 0) {
488 // CONSIDER: use Self->OnDeck instead of m->OnDeck.
489 // Deschedule Self so that others may run.
494 // Self is now in the ONDECK position and will remain so until it
499 if (TrySpin (Self)) break ;
738 int Monitor::IWait (Thread * Self, jlong timo) {
742 // 1. Enqueue Self on WaitSet - currently prepend
747 ParkEvent * const ESelf = Self->_MutexEvent ;
752 // Add Self to WaitSet
846 ILock (Self) ;
852 if (_OnDeck == ESelf && TrySpin(Self)) break ;
899 void Monitor::lock (Thread * Self) {
903 if (Self->is_Java_thread()) {
904 Self->clear_unhandled_oops();
908 debug_only(check_prelock_state(Self));
909 assert (_owner != Self , "invariant") ;
910 assert (_OnDeck != Self->_MutexEvent, "invariant") ;
916 set_owner (Self);
922 bool can_sneak = Self->is_VM_thread() && SafepointSynchronize::is_at_safepoint();
933 if (TrySpin (Self)) goto Exeunt ;
935 check_block_state(Self);
936 if (Self->is_Java_thread()) {
939 ThreadBlockInVM tbivm ((JavaThread *) Self) ;
940 ILock (Self) ;
943 ILock (Self) ;
957 void Monitor::lock_without_safepoint_check (Thread * Self) {
958 assert (_owner != Self, "invariant") ;
959 ILock (Self) ;
961 set_owner (Self);
972 Thread * const Self = Thread::current();
973 debug_only(check_prelock_state(Self));
980 bool can_sneak = Self->is_VM_thread() && SafepointSynchronize::is_at_safepoint();
982 set_owner(Self); // Do not need to be atomic, since we are at a safepoint
990 set_owner (Self);
1052 // Either Enqueue Self on cxq or acquire the outer lock.
1061 // CONSIDER: use Self->OnDeck instead of m->OnDeck.
1086 Thread * const Self = Thread::current() ;
1087 assert (_owner == Self, "invariant") ;
1093 guarantee (no_safepoint_check || Self->is_Java_thread(), "invariant") ;
1096 Monitor * least = get_least_ranked_lock_besides_this(Self->owned_locks());
1111 wait_status = IWait (Self, timeout) ;
1113 assert (Self->is_Java_thread(), "invariant") ;
1114 JavaThread *jt = (JavaThread *)Self;
1118 OSThreadWaitState osts(Self->osthread(), false /* not Object.wait() */);
1126 wait_status = IWait (Self, timeout) ;
1137 ILock (Self) ;
1146 set_owner (Self) ;