src/hotspot/share/runtime/basicLock.hpp
changeset 49364 601146c66cad
parent 47216 71c04702a3d5
child 53244 9807daeb47c4
equal deleted inserted replaced
49363:7be58576e71a 49364:601146c66cad
     1 /*
     1 /*
     2  * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    26 #define SHARE_VM_RUNTIME_BASICLOCK_HPP
    26 #define SHARE_VM_RUNTIME_BASICLOCK_HPP
    27 
    27 
    28 #include "oops/markOop.hpp"
    28 #include "oops/markOop.hpp"
    29 #include "runtime/handles.hpp"
    29 #include "runtime/handles.hpp"
    30 
    30 
    31 class BasicLock VALUE_OBJ_CLASS_SPEC {
    31 class BasicLock {
    32   friend class VMStructs;
    32   friend class VMStructs;
    33   friend class JVMCIVMStructs;
    33   friend class JVMCIVMStructs;
    34  private:
    34  private:
    35   volatile markOop _displaced_header;
    35   volatile markOop _displaced_header;
    36  public:
    36  public:
    52 // the actual space allocated by the interpreter may include padding words
    52 // the actual space allocated by the interpreter may include padding words
    53 // after the end of the BasicObjectLock.  Also, in order to guarantee
    53 // after the end of the BasicObjectLock.  Also, in order to guarantee
    54 // alignment of the embedded BasicLock objects on such machines, we
    54 // alignment of the embedded BasicLock objects on such machines, we
    55 // put the embedded BasicLock at the beginning of the struct.
    55 // put the embedded BasicLock at the beginning of the struct.
    56 
    56 
    57 class BasicObjectLock VALUE_OBJ_CLASS_SPEC {
    57 class BasicObjectLock {
    58   friend class VMStructs;
    58   friend class VMStructs;
    59  private:
    59  private:
    60   BasicLock _lock;                                    // the lock, must be double word aligned
    60   BasicLock _lock;                                    // the lock, must be double word aligned
    61   oop       _obj;                                     // object holds the lock;
    61   oop       _obj;                                     // object holds the lock;
    62 
    62