aboutsummaryrefslogtreecommitdiff
path: root/src/clients/cave/cmd_search.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2013-05-16 20:03:48 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2013-05-22 23:19:18 +0100
commit78d9a9bf0758140e0e8c03c5e8d3288f74efbb51 (patch)
tree1c0b25ba6358e80d0fe535fb49e3cce8d243e6a3 /src/clients/cave/cmd_search.cc
parent39834ca3b05fadb14f855a8ab6dcea98c35738a7 (diff)
downloadpaludis-78d9a9bf0758140e0e8c03c5e8d3288f74efbb51.tar.gz
paludis-78d9a9bf0758140e0e8c03c5e8d3288f74efbb51.tar.xz
Switch to std mutex and condition_variable
Diffstat (limited to 'src/clients/cave/cmd_search.cc')
-rw-r--r--src/clients/cave/cmd_search.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/clients/cave/cmd_search.cc b/src/clients/cave/cmd_search.cc
index 6afbb408a..9b87f89a7 100644
--- a/src/clients/cave/cmd_search.cc
+++ b/src/clients/cave/cmd_search.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2010, 2011 Ciaran McCreesh
+ * Copyright (c) 2010, 2011, 2013 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -45,7 +45,6 @@
#include <paludis/util/wrapped_forward_iterator.hh>
#include <paludis/util/indirect_iterator-impl.hh>
#include <paludis/util/wrapped_output_iterator.hh>
-#include <paludis/util/mutex.hh>
#include <paludis/util/iterator_funcs.hh>
#include <paludis/util/make_null_shared_ptr.hh>
#include <paludis/util/stringify.hh>
@@ -53,6 +52,7 @@
#include <cstdlib>
#include <iostream>
#include <algorithm>
+#include <mutex>
#include <set>
#include <map>
#include <unistd.h>
@@ -134,7 +134,7 @@ namespace
struct DisplayCallback
{
- mutable Mutex mutex;
+ mutable std::mutex mutex;
mutable std::map<std::string, int> metadata;
mutable int steps;
mutable std::string stage;
@@ -221,7 +221,7 @@ namespace
if (! output)
return;
- Lock lock(mutex);
+ std::unique_lock<std::mutex> lock(mutex);
++steps;
stage = s.stage;
update();
@@ -232,7 +232,7 @@ namespace
if (! output)
return;
- Lock lock(mutex);
+ std::unique_lock<std::mutex> lock(mutex);
++metadata.insert(std::make_pair(stringify(e.repository()), 0)).first->second;
update();
}