summaryrefslogtreecommitdiffstats
path: root/searchcorespi
diff options
context:
space:
mode:
Diffstat (limited to 'searchcorespi')
-rw-r--r--searchcorespi/src/vespa/searchcorespi/index/indexwriteutilities.cpp1
-rw-r--r--searchcorespi/src/vespa/searchcorespi/index/warmupindexcollection.cpp4
-rw-r--r--searchcorespi/src/vespa/searchcorespi/index/warmupindexcollection.h2
3 files changed, 4 insertions, 3 deletions
diff --git a/searchcorespi/src/vespa/searchcorespi/index/indexwriteutilities.cpp b/searchcorespi/src/vespa/searchcorespi/index/indexwriteutilities.cpp
index 3d3231a5e09..c8b2e81a9c0 100644
--- a/searchcorespi/src/vespa/searchcorespi/index/indexwriteutilities.cpp
+++ b/searchcorespi/src/vespa/searchcorespi/index/indexwriteutilities.cpp
@@ -7,6 +7,7 @@
#include <vespa/fastlib/io/bufferedfile.h>
#include <vespa/vespalib/util/exceptions.h>
#include <sstream>
+#include <unistd.h>
#include <vespa/log/log.h>
LOG_SETUP(".searchcorespi.index.indexwriteutilities");
diff --git a/searchcorespi/src/vespa/searchcorespi/index/warmupindexcollection.cpp b/searchcorespi/src/vespa/searchcorespi/index/warmupindexcollection.cpp
index cd0a4caf33b..75412dcf8e9 100644
--- a/searchcorespi/src/vespa/searchcorespi/index/warmupindexcollection.cpp
+++ b/searchcorespi/src/vespa/searchcorespi/index/warmupindexcollection.cpp
@@ -117,7 +117,7 @@ WarmupIndexCollection::fireWarmup(Task::UP task)
if (now < _warmupEndTime) {
_executor.execute(std::move(task));
} else {
- vespalib::LockGuard guard(_lock);
+ std::unique_lock<std::mutex> guard(_lock);
if (_warmupEndTime != 0) {
_warmupEndTime = 0;
guard.unlock();
@@ -133,7 +133,7 @@ WarmupIndexCollection::handledBefore(uint32_t fieldId, const Node &term)
const StringBase * sb(dynamic_cast<const StringBase *>(&term));
if (sb != NULL) {
const vespalib::string & s = sb->getTerm();
- vespalib::LockGuard guard(_lock);
+ std::lock_guard<std::mutex> guard(_lock);
TermMap::insert_result found = (*_handledTerms)[fieldId].insert(s);
return ! found.second;
}
diff --git a/searchcorespi/src/vespa/searchcorespi/index/warmupindexcollection.h b/searchcorespi/src/vespa/searchcorespi/index/warmupindexcollection.h
index 96f46610a29..f6d6bc89fc4 100644
--- a/searchcorespi/src/vespa/searchcorespi/index/warmupindexcollection.h
+++ b/searchcorespi/src/vespa/searchcorespi/index/warmupindexcollection.h
@@ -99,7 +99,7 @@ private:
vespalib::ThreadExecutor & _executor;
IWarmupDone & _warmupDone;
fastos::TimeStamp _warmupEndTime;
- vespalib::Lock _lock;
+ std::mutex _lock;
std::unique_ptr<FieldTermMap> _handledTerms;
};