mirror of
https://github.com/Z3Prover/z3
synced 2025-06-19 12:23:38 +00:00
mux
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
2788f72bbb
commit
9262908ebb
30 changed files with 191 additions and 341 deletions
|
@ -20,8 +20,10 @@ Revision History:
|
|||
#include "util/str_hashtable.h"
|
||||
#include "util/region.h"
|
||||
#include "util/string_buffer.h"
|
||||
#include "util/z3_omp.h"
|
||||
#include <cstring>
|
||||
#include <mutex>
|
||||
|
||||
static std::mutex g_symbol_lock;
|
||||
|
||||
symbol symbol::m_dummy(TAG(void*, nullptr, 2));
|
||||
const symbol symbol::null;
|
||||
|
@ -36,8 +38,7 @@ public:
|
|||
|
||||
char const * get_str(char const * d) {
|
||||
const char * result;
|
||||
#pragma omp critical (cr_symbol)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(g_symbol_lock);
|
||||
str_hashtable::entry * e;
|
||||
if (m_table.insert_if_not_there_core(d, e)) {
|
||||
// new entry
|
||||
|
@ -55,7 +56,6 @@ public:
|
|||
result = e->get_data();
|
||||
}
|
||||
SASSERT(m_table.contains(result));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue