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
3333#include < string>
3434#include < sstream>
3535#include < functional>
36+ #include < mutex>
3637
3738using namespace vISA ;
3839extern " C" int64_t getTimerTicks (unsigned int idx);
@@ -919,9 +920,11 @@ typedef struct yy_buffer_state * YY_BUFFER_STATE;
919920extern int CISAparse (CISA_IR_Builder *builder);
920921extern YY_BUFFER_STATE CISA_scan_string (const char * yy_str);
921922extern void CISA_delete_buffer (YY_BUFFER_STATE buf);
923+ static std::mutex mtx;
922924
923925int CISA_IR_Builder::ParseVISAText (const std::string& visaText, const std::string& visaTextFile)
924926{
927+ const std::lock_guard<std::mutex> lock (mtx);
925928#if defined(__linux__) || defined(_WIN64) || defined(_WIN32)
926929 // Direct output of parser to null
927930#if defined(_WIN64) || defined(_WIN32)
You can’t perform that action at this time.
0 commit comments