X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/cdf6a962eb4e88efbed3df9c41343adabcf09e6c..2da658602553ee14a2d2e3d7d6f588a512218bed:/src/s4u/s4u_Semaphore.cpp diff --git a/src/s4u/s4u_Semaphore.cpp b/src/s4u/s4u_Semaphore.cpp index debf3ecda3..b4a5ed709c 100644 --- a/src/s4u/s4u_Semaphore.cpp +++ b/src/s4u/s4u_Semaphore.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2018-2019. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2018-2020. 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. */ @@ -21,7 +21,7 @@ Semaphore::Semaphore(unsigned int initial_capacity) Semaphore::~Semaphore() { if (sem_ != nullptr) { - xbt_assert(sem_->sleeping_.empty(), "Cannot destroy semaphore since someone is still using it"); + xbt_assert(not sem_->is_used(), "Cannot destroy semaphore since someone is still using it"); delete sem_; } } @@ -104,7 +104,7 @@ int sg_sem_get_capacity(sg_sem_t sem) return sem->get_capacity(); } -void sg_sem_destroy(sg_sem_t sem) +void sg_sem_destroy(const_sg_sem_t sem) { delete sem; }