Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines.
[simgrid.git] / src / kernel / activity / SemaphoreImpl.hpp
index 361c7cf..f2d05b7 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2019-2020. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2019-2021. 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. */
@@ -30,11 +30,11 @@ public:
 
   void acquire(actor::ActorImpl* issuer, double timeout);
   void release();
-  bool would_block() { return (value_ == 0); }
+  bool would_block() const { return (value_ == 0); }
   void remove_sleeping_actor(actor::ActorImpl& actor) { xbt::intrusive_erase(sleeping_, actor); }
 
-  unsigned int get_capacity() { return value_; }
-  bool is_used() { return not sleeping_.empty(); }
+  unsigned int get_capacity() const { return value_; }
+  bool is_used() const { return not sleeping_.empty(); }
 
   friend void intrusive_ptr_add_ref(SemaphoreImpl* sem)
   {