mirror of
https://github.com/verilator/verilator.git
synced 2025-01-22 14:24:18 +00:00
Include: Fix command line parser hang when threaded.
This commit is contained in:
parent
e4e3294363
commit
b1ab48b9fc
@ -1678,7 +1678,7 @@ void Verilated::flushCall() VL_MT_SAFE {
|
||||
}
|
||||
|
||||
void Verilated::commandArgs(int argc, const char** argv) VL_MT_SAFE {
|
||||
VerilatedLockGuard lock(m_mutex);
|
||||
VerilatedLockGuard lock(s_args.m_argMutex);
|
||||
s_args.argc = argc;
|
||||
s_args.argv = argv;
|
||||
VerilatedImp::commandArgs(argc,argv);
|
||||
|
@ -347,6 +347,7 @@ class Verilated {
|
||||
// no need to be save-restored (serialized) the
|
||||
// assumption is that the restore is allowed to pass different arguments
|
||||
static struct CommandArgValues {
|
||||
VerilatedMutex m_argMutex; ///< Mutex for s_args members, when VL_THREADED
|
||||
int argc;
|
||||
const char** argv;
|
||||
CommandArgValues() : argc(0), argv(NULL) {}
|
||||
|
Loading…
Reference in New Issue
Block a user