Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
this header is C++ only
authorMartin Quinson <martin.quinson@loria.fr>
Wed, 5 Jul 2017 14:37:53 +0000 (16:37 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Wed, 5 Jul 2017 15:15:54 +0000 (17:15 +0200)
src/kernel/activity/SynchroRaw.cpp
src/kernel/context/Context.hpp
src/s4u/s4u_conditionVariable.cpp
src/s4u/s4u_mutex.cpp
src/simix/smx_synchro_private.hpp [moved from src/simix/smx_synchro_private.h with 84% similarity]
tools/cmake/DefinePackages.cmake

index 509c41d..0b11a05 100644 (file)
@@ -1,11 +1,11 @@
-/* Copyright (c) 2007-2016. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-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. */
 
 #include "src/kernel/activity/SynchroRaw.hpp"
 
 /* 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/kernel/activity/SynchroRaw.hpp"
+#include "src/simix/smx_synchro_private.hpp"
 #include "src/surf/surf_interface.hpp"
 #include "src/surf/surf_interface.hpp"
-#include "src/simix/smx_synchro_private.h"
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_synchro);
 
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_synchro);
 
index 8663333..087b175 100644 (file)
 
 #include <xbt/functional.hpp>
 
 
 #include <xbt/functional.hpp>
 
-#include "src/internal_config.h"
 #include "simgrid/simix.h"
 #include "simgrid/simix.h"
+#include "src/instr/instr_private.h"
+#include "src/internal_config.h"
+#include "src/simix/popping_private.h"
+#include "src/simix/smx_host_private.h"
+#include "src/simix/smx_io_private.h"
+#include "src/simix/smx_network_private.h"
+#include "src/simix/smx_synchro_private.hpp"
 #include "surf/surf.h"
 #include "xbt/base.h"
 #include "surf/surf.h"
 #include "xbt/base.h"
-#include "xbt/swag.h"
+#include "xbt/config.h"
 #include "xbt/dict.h"
 #include "xbt/dict.h"
+#include "xbt/function_types.h"
 #include "xbt/mallocator.h"
 #include "xbt/mallocator.h"
-#include "xbt/config.h"
+#include "xbt/swag.h"
 #include "xbt/xbt_os_time.h"
 #include "xbt/xbt_os_time.h"
-#include "xbt/function_types.h"
-#include "src/instr/instr_private.h"
-#include "src/simix/smx_host_private.h"
-#include "src/simix/smx_io_private.h"
-#include "src/simix/smx_network_private.h"
-#include "src/simix/popping_private.h"
-#include "src/simix/smx_synchro_private.h"
 
 #include <signal.h>
 #include "src/simix/ActorImpl.hpp"
 
 #include <signal.h>
 #include "src/simix/ActorImpl.hpp"
index 709276c..33e9df7 100644 (file)
@@ -11,7 +11,7 @@
 
 #include "simgrid/s4u/ConditionVariable.hpp"
 #include "simgrid/simix.h"
 
 #include "simgrid/s4u/ConditionVariable.hpp"
 #include "simgrid/simix.h"
-#include "src/simix/smx_synchro_private.h"
+#include "src/simix/smx_synchro_private.hpp"
 
 namespace simgrid {
 namespace s4u {
 
 namespace simgrid {
 namespace s4u {
index 4f2cce6..5e63f24 100644 (file)
@@ -1,12 +1,11 @@
-/* Copyright (c) 2006-2015. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2006-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. */
 
 
 /* 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 "xbt/log.h"
 #include "src/msg/msg_private.h"
 #include "src/msg/msg_private.h"
-#include "src/simix/smx_synchro_private.h"
+#include "src/simix/smx_synchro_private.hpp"
+#include "xbt/log.h"
 
 #include "simgrid/s4u/Mutex.hpp"
 
 
 #include "simgrid/s4u/Mutex.hpp"
 
similarity index 84%
rename from src/simix/smx_synchro_private.h
rename to src/simix/smx_synchro_private.hpp
index c263d25..8eb66a5 100644 (file)
@@ -23,7 +23,7 @@ public:
   bool try_lock(smx_actor_t issuer);
   void unlock(smx_actor_t issuer);
 
   bool try_lock(smx_actor_t issuer);
   void unlock(smx_actor_t issuer);
 
-  bool locked = false;
+  bool locked       = false;
   smx_actor_t owner = nullptr;
   // List of sleeping processes:
   xbt_swag_t sleeping = nullptr;
   smx_actor_t owner = nullptr;
   // List of sleeping processes:
   xbt_swag_t sleeping = nullptr;
@@ -46,25 +46,24 @@ public:
   simgrid::s4u::Mutex& mutex() { return mutex_; }
 
 private:
   simgrid::s4u::Mutex& mutex() { return mutex_; }
 
 private:
-  std::atomic_int_fast32_t refcount_ { 1 };
+  std::atomic_int_fast32_t refcount_{1};
   simgrid::s4u::Mutex mutex_;
 };
   simgrid::s4u::Mutex mutex_;
 };
-
 }
 }
 
 typedef struct s_smx_cond {
   s_smx_cond() : cond_(this) {}
 
 }
 }
 
 typedef struct s_smx_cond {
   s_smx_cond() : cond_(this) {}
 
-  std::atomic_int_fast32_t refcount_ { 1 };
-  smx_mutex_t mutex = nullptr;
-  xbt_swag_t sleeping = nullptr;  /* list of sleeping process */
+  std::atomic_int_fast32_t refcount_{1};
+  smx_mutex_t mutex   = nullptr;
+  xbt_swag_t sleeping = nullptr; /* list of sleeping process */
   simgrid::s4u::ConditionVariable cond_;
 } s_smx_cond_t;
 
 typedef struct s_smx_sem {
   unsigned int value;
   simgrid::s4u::ConditionVariable cond_;
 } s_smx_cond_t;
 
 typedef struct s_smx_sem {
   unsigned int value;
-  xbt_swag_t sleeping;          /* list of sleeping process */
+  xbt_swag_t sleeping; /* list of sleeping process */
 } s_smx_sem_t;
 
 XBT_PRIVATE void SIMIX_post_synchro(smx_activity_t synchro);
 } s_smx_sem_t;
 
 XBT_PRIVATE void SIMIX_post_synchro(smx_activity_t synchro);
@@ -75,8 +74,8 @@ XBT_PRIVATE void SIMIX_synchro_finish(smx_activity_t synchro);
 XBT_PRIVATE smx_cond_t SIMIX_cond_init();
 XBT_PRIVATE void SIMIX_cond_broadcast(smx_cond_t cond);
 XBT_PRIVATE void SIMIX_cond_signal(smx_cond_t cond);
 XBT_PRIVATE smx_cond_t SIMIX_cond_init();
 XBT_PRIVATE void SIMIX_cond_broadcast(smx_cond_t cond);
 XBT_PRIVATE void SIMIX_cond_signal(smx_cond_t cond);
-XBT_PRIVATE void intrusive_ptr_add_ref(s_smx_cond_t *cond);
-XBT_PRIVATE void intrusive_ptr_release(s_smx_cond_t *cond);
+XBT_PRIVATE void intrusive_ptr_add_ref(s_smx_cond_tcond);
+XBT_PRIVATE void intrusive_ptr_release(s_smx_cond_tcond);
 
 XBT_PRIVATE XBT_PRIVATE smx_sem_t SIMIX_sem_init(unsigned int value);
 XBT_PRIVATE void SIMIX_sem_release(smx_sem_t sem);
 
 XBT_PRIVATE XBT_PRIVATE smx_sem_t SIMIX_sem_init(unsigned int value);
 XBT_PRIVATE void SIMIX_sem_release(smx_sem_t sem);
index dd2b085..6415bbb 100644 (file)
@@ -29,7 +29,7 @@ set(EXTRA_DIST
   src/simix/smx_io_private.h
   src/simix/smx_network_private.h
   src/simix/smx_private.h
   src/simix/smx_io_private.h
   src/simix/smx_network_private.h
   src/simix/smx_private.h
-  src/simix/smx_synchro_private.h
+  src/simix/smx_synchro_private.hpp
   src/smpi/colls/coll_tuned_topo.h
   src/smpi/colls/colls_private.h
   src/smpi/colls/smpi_mvapich2_selector_stampede.h
   src/smpi/colls/coll_tuned_topo.h
   src/smpi/colls/colls_private.h
   src/smpi/colls/smpi_mvapich2_selector_stampede.h