X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/71d215251ec3eeb3e4192c0e14ec6dea8fd97007..e2f4c322102dab25d663a761157720cbbb11702d:/src/xbt/xbt_os_synchro.cpp diff --git a/src/xbt/xbt_os_synchro.cpp b/src/xbt/xbt_os_synchro.cpp index d1d8b0a559..1992ab40f2 100644 --- a/src/xbt/xbt_os_synchro.cpp +++ b/src/xbt/xbt_os_synchro.cpp @@ -1,14 +1,15 @@ /* Classical synchro schema, implemented on top of SimGrid */ -/* Copyright (c) 2007-2018. The SimGrid Team. +/* Copyright (c) 2007-2019. 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 "simgrid/exception.hpp" +#include "simgrid/Exception.hpp" #include "simgrid/simix.h" /* used implementation */ #include "src/kernel/activity/ConditionVariableImpl.hpp" +#include "src/kernel/activity/MutexImpl.hpp" #include "xbt/synchro.h" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_sync, xbt, "Synchronization mechanism"); @@ -36,7 +37,8 @@ void xbt_mutex_release(xbt_mutex_t mutex) void xbt_mutex_destroy(xbt_mutex_t mutex) { - SIMIX_mutex_unref((smx_mutex_t)mutex); + if (mutex != nullptr) + mutex->unref(); } /***** condition related functions *****/