Internals: Mark more VL_MT_SAFE functions. No functional change

This commit is contained in:
Wilson Snyder 2022-12-11 23:10:59 -05:00
parent 61d6546400
commit 424faa883e
2 changed files with 8 additions and 8 deletions

View File

@ -181,7 +181,7 @@ void svPutPartselLogic(svLogicVecVal* dp, const svLogicVecVal s, int lbit, int w
//======================================================================
// Open array internals
static const VerilatedDpiOpenVar* _vl_openhandle_varp(const svOpenArrayHandle h) {
static const VerilatedDpiOpenVar* _vl_openhandle_varp(const svOpenArrayHandle h) VL_MT_SAFE {
if (VL_UNLIKELY(!h)) {
VL_FATAL_MT(__FILE__, __LINE__, "",
"%%Error: DPI svOpenArrayHandle function called with nullptr handle");
@ -223,7 +223,7 @@ int svSizeOfArray(const svOpenArrayHandle h) {
// Open array access internals
static void* _vl_sv_adjusted_datap(const VerilatedDpiOpenVar* varp, int nargs, int indx1,
int indx2, int indx3) {
int indx2, int indx3) VL_MT_SAFE {
void* datap = varp->datap();
if (VL_UNLIKELY(nargs != varp->udims())) {
VL_SVDPI_WARN_("%%Warning: DPI svOpenArrayHandle function called on"

View File

@ -53,14 +53,14 @@ public:
: m_left{left}
, m_right{right} {}
~VerilatedRange() = default;
int left() const { return m_left; }
int right() const { return m_right; }
int low() const { return (m_left < m_right) ? m_left : m_right; }
int high() const { return (m_left > m_right) ? m_left : m_right; }
int elements() const {
int left() const VL_PURE { return m_left; }
int right() const VL_PURE { return m_right; }
int low() const VL_PURE { return (m_left < m_right) ? m_left : m_right; }
int high() const VL_PURE { return (m_left > m_right) ? m_left : m_right; }
int elements() const VL_PURE {
return (VL_LIKELY(m_left >= m_right) ? (m_left - m_right + 1) : (m_right - m_left + 1));
}
int increment() const { return (m_left >= m_right) ? 1 : -1; }
int increment() const VL_PURE { return (m_left >= m_right) ? 1 : -1; }
};
//===========================================================================