File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ SPDX-License-Identifier: MIT
33
33
#include < string>
34
34
#include < sstream>
35
35
#include < functional>
36
+ #include < mutex>
36
37
37
38
using namespace vISA ;
38
39
extern " C" int64_t getTimerTicks (unsigned int idx);
@@ -919,9 +920,11 @@ typedef struct yy_buffer_state * YY_BUFFER_STATE;
919
920
extern int CISAparse (CISA_IR_Builder *builder);
920
921
extern YY_BUFFER_STATE CISA_scan_string (const char * yy_str);
921
922
extern void CISA_delete_buffer (YY_BUFFER_STATE buf);
923
+ static std::mutex mtx;
922
924
923
925
int CISA_IR_Builder::ParseVISAText (const std::string& visaText, const std::string& visaTextFile)
924
926
{
927
+ const std::lock_guard<std::mutex> lock (mtx);
925
928
#if defined(__linux__) || defined(_WIN64) || defined(_WIN32)
926
929
// Direct output of parser to null
927
930
#if defined(_WIN64) || defined(_WIN32)
You can’t perform that action at this time.
0 commit comments