-/* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2006-2018. 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. */
-#include "src/msg/msg_private.hpp"
-#include "src/simix/smx_synchro_private.hpp"
-#include "xbt/log.h"
-
#include "simgrid/s4u/Mutex.hpp"
+#include "src/kernel/activity/MutexImpl.hpp"
namespace simgrid {
namespace s4u {
return MutexPtr(&mutex->mutex(), false);
}
+/* refcounting of the intrusive_ptr is delegated to the implementation object */
+void intrusive_ptr_add_ref(Mutex* mutex)
+{
+ xbt_assert(mutex);
+ SIMIX_mutex_ref(mutex->mutex_);
+}
+void intrusive_ptr_release(Mutex* mutex)
+{
+ xbt_assert(mutex);
+ SIMIX_mutex_unref(mutex->mutex_);
+}
}
}