< prev index next > src/hotspot/cpu/aarch64/spin_wait_aarch64.hpp
Print this page
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
- *
*/
#ifndef CPU_AARCH64_SPIN_WAIT_AARCH64_HPP
#define CPU_AARCH64_SPIN_WAIT_AARCH64_HPP
public:
enum Inst {
NONE = -1,
NOP,
ISB,
! YIELD
};
private:
Inst _inst;
int _count;
public:
! SpinWait(Inst inst = NONE, int count = 0) : _inst(inst), _count(count) {}
Inst inst() const { return _inst; }
int inst_count() const { return _count; }
};
#endif // CPU_AARCH64_SPIN_WAIT_AARCH64_HPP
public:
enum Inst {
NONE = -1,
NOP,
ISB,
! YIELD,
+ SB
};
private:
Inst _inst;
int _count;
+ Inst from_name(const char *name);
+
public:
! SpinWait(Inst inst = NONE, int count = 0) : _inst(inst), _count(inst == NONE ? 0 : count) {}
+ SpinWait(const char *name, int count) : SpinWait(from_name(name), count) {}
Inst inst() const { return _inst; }
int inst_count() const { return _count; }
+
+ static bool supports(const char *name);
};
#endif // CPU_AARCH64_SPIN_WAIT_AARCH64_HPP
< prev index next >