Internals: Add VL_MT_SAFE attribute to functions that requires locking. (#3805)

This commit is contained in:
Kamil Rakoczy
2023-03-17 20:24:15 -04:00
committed by GitHub
parent d6c5d40f9b
commit 798d7346cf
35 changed files with 185 additions and 143 deletions
+2 -2
View File
@@ -498,7 +498,7 @@ V3Number& V3Number::setMask(int nbits) {
//======================================================================
// ACCESSORS - as strings
string V3Number::ascii(bool prefixed, bool cleanVerilog) const {
string V3Number::ascii(bool prefixed, bool cleanVerilog) const VL_MT_SAFE {
std::ostringstream out;
if (is1Step()) {
@@ -1050,7 +1050,7 @@ bool V3Number::isEqAllOnes(int optwidth) const {
}
return true;
}
bool V3Number::isFourState() const {
bool V3Number::isFourState() const VL_MT_SAFE {
if (isDouble() || isString()) return false;
for (int i = 0; i < words(); ++i) {
if (m_data.num()[i].m_valueX) return true;