Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git] / src / simix / smx_synchro_private.h
index c7f882b..c263d25 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2016. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2012-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -6,18 +6,18 @@
 #ifndef SIMIX_SYNCHRO_PRIVATE_H
 #define SIMIX_SYNCHRO_PRIVATE_H
 
-#include "simgrid/s4u/conditionVariable.hpp"
+#include "simgrid/s4u/ConditionVariable.hpp"
 #include "xbt/swag.h"
 
 namespace simgrid {
 namespace simix {
 
-class XBT_PUBLIC() Mutex {
+class XBT_PUBLIC() MutexImpl {
 public:
-  Mutex();
-  ~Mutex();
-  Mutex(Mutex const&) = delete;
-  Mutex& operator=(Mutex const&) = delete;
+  MutexImpl();
+  ~MutexImpl();
+  MutexImpl(MutexImpl const&) = delete;
+  MutexImpl& operator=(MutexImpl const&) = delete;
 
   void lock(smx_actor_t issuer);
   bool try_lock(smx_actor_t issuer);
@@ -29,14 +29,13 @@ public:
   xbt_swag_t sleeping = nullptr;
 
   // boost::intrusive_ptr<Mutex> support:
-  friend void intrusive_ptr_add_ref(Mutex* mutex)
+  friend void intrusive_ptr_add_ref(MutexImpl* mutex)
   {
     // Atomic operation! Do not split in two instructions!
-    auto previous = (mutex->refcount_)++;
+    XBT_ATTRIB_UNUSED auto previous = (mutex->refcount_)++;
     xbt_assert(previous != 0);
-    (void) previous;
   }
-  friend void intrusive_ptr_release(Mutex* mutex)
+  friend void intrusive_ptr_release(MutexImpl* mutex)
   {
     // Atomic operation! Do not split in two instructions!
     auto count = --(mutex->refcount_);