mirror of
https://github.com/verilator/verilator.git
synced 2025-01-01 04:07:34 +00:00
Internals: Mark more VL_MT_SAFE functions. No functional change
This commit is contained in:
parent
87135d0b2d
commit
338e875b70
@ -248,7 +248,7 @@ protected:
|
||||
public:
|
||||
/// Returns the VerilatedContext this model is instantiated under
|
||||
/// Used to get to e.g. simulation time via contextp()->time()
|
||||
VerilatedContext* contextp() const { return &m_context; }
|
||||
VerilatedContext* contextp() const VL_MT_SAFE { return &m_context; }
|
||||
/// Returns the hierarchical name of this module instance.
|
||||
virtual const char* hierName() const = 0;
|
||||
/// Returns the name of this model (the name of the generated model class).
|
||||
@ -718,7 +718,7 @@ public:
|
||||
lastContextp(contextp);
|
||||
}
|
||||
/// Return the VerilatedContext for the current thread
|
||||
static VerilatedContext* threadContextp() {
|
||||
static VerilatedContext* threadContextp() VL_MT_SAFE {
|
||||
if (VL_UNLIKELY(!t_s.t_contextp)) t_s.t_contextp = lastContextp();
|
||||
return t_s.t_contextp;
|
||||
}
|
||||
|
@ -441,7 +441,7 @@ protected:
|
||||
friend class Verilated;
|
||||
|
||||
// MEMBERS
|
||||
static VerilatedImpData& s() { // Singleton
|
||||
static VerilatedImpData& s() VL_MT_SAFE { // Singleton
|
||||
static VerilatedImpData s_s;
|
||||
return s_s;
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ public:
|
||||
|
||||
// ACCESSORS
|
||||
// Set size in bytes after which new file should be created.
|
||||
void rolloverSize(uint64_t size) { m_rolloverSize = size; }
|
||||
void rolloverSize(uint64_t size) VL_MT_SAFE { m_rolloverSize = size; }
|
||||
|
||||
// METHODS - All must be thread safe
|
||||
// Open the file; call isOpen() to see if errors
|
||||
|
@ -67,7 +67,7 @@ class VerilatedVpio VL_NOT_FINAL {
|
||||
// CONSTANTS
|
||||
// Magic value stored in front of object to detect double free etc
|
||||
// Must be odd, as aligned pointer can never be odd
|
||||
static constexpr uint32_t activeMagic() { return 0xfeed100f; }
|
||||
static constexpr uint32_t activeMagic() VL_PURE { return 0xfeed100f; }
|
||||
|
||||
// MEM MANGLEMENT
|
||||
// Internal note: Globals may multi-construct, see verilated.cpp top.
|
||||
|
Loading…
Reference in New Issue
Block a user