< prev index next >

src/hotspot/share/runtime/mutex.hpp

Print this page
rev 52886 : imported patch new_rank

@@ -85,10 +85,12 @@
   // A special lock: Is a lock where you are guaranteed not to block while you are
   // holding it, i.e., no vm operation can happen, taking other (blocking) locks, etc.
   // The rank 'access' is similar to 'special' and has the same restrictions on usage.
   // It is reserved for locks that may be required in order to perform memory accesses
   // that require special barriers, e.g. SATB GC barriers, that in turn uses locks.
+  // The rank 'tty' is also similar to 'special' and has the same restrictions.
+  // It is reserved for the tty_lock.
   // Since memory accesses should be able to be performed pretty much anywhere
   // in the code, that requires locks required for performing accesses being
   // inherently a bit more special than even locks of the 'special' rank.
   // NOTE: It is critical that the rank 'special' be the lowest (earliest)
   // (except for "event" and "access") for the deadlock detection to work correctly.

@@ -102,11 +104,12 @@
   // be changed) -- mutexes of this rank aren't really leaf mutexes
   // at all.
   enum lock_types {
        event,
        access         = event          +   1,
-       special        = access         +   2,
+       tty            = access         +   2,
+       special        = tty            +   1,
        suspend_resume = special        +   1,
        vmweak         = suspend_resume +   2,
        leaf           = vmweak         +   2,
        safepoint      = leaf           +  10,
        barrier        = safepoint      +   1,

@@ -234,11 +237,11 @@
 
   void print_on_error(outputStream* st) const;
 
   #ifndef PRODUCT
     void print_on(outputStream* st) const;
-    void print() const                      { print_on(tty); }
+    void print() const                      { print_on(::tty); }
     DEBUG_ONLY(int    rank() const          { return _rank; })
     bool   allow_vm_block()                 { return _allow_vm_block; }
 
     DEBUG_ONLY(Monitor *next()  const         { return _next; })
     DEBUG_ONLY(void   set_next(Monitor *next) { _next = next; })
< prev index next >