aboutsummaryrefslogtreecommitdiff
path: root/paludis/util/singleton-impl.hh
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/util/singleton-impl.hh')
-rw-r--r--paludis/util/singleton-impl.hh8
1 files changed, 4 insertions, 4 deletions
diff --git a/paludis/util/singleton-impl.hh b/paludis/util/singleton-impl.hh
index 75875dfb4..dda1a1c2d 100644
--- a/paludis/util/singleton-impl.hh
+++ b/paludis/util/singleton-impl.hh
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2005, 2006, 2007, 2010 Ciaran McCreesh
+ * Copyright (c) 2005, 2006, 2007, 2010, 2012, 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
@@ -24,7 +24,7 @@
#include <paludis/util/exception.hh>
#include <paludis/util/save.hh>
#include <paludis/util/stringify.hh>
-#include <paludis/util/mutex.hh>
+#include <mutex>
template <typename OurType_>
void
@@ -66,8 +66,8 @@ template<typename OurType_>
OurType_ *
paludis::Singleton<OurType_>::get_instance()
{
- static Mutex m;
- Lock l(m);
+ static std::recursive_mutex m;
+ std::unique_lock<std::recursive_mutex> lock(m);
OurType_ * * i(_get_instance_ptr());