Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Move collective algorithms to separate folders
[simgrid.git] / src / simix / smx_synchro_private.h
index 7faa049..8066b43 100644 (file)
@@ -1,20 +1,13 @@
-/* Copyright (c) 2012-2016. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2012-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. */
 
-#ifndef _SIMIX_SYNCHRO_PRIVATE_H
-#define _SIMIX_SYNCHRO_PRIVATE_H
+#ifndef SIMIX_SYNCHRO_PRIVATE_H
+#define SIMIX_SYNCHRO_PRIVATE_H
 
-#include <atomic>
-
-#include <simgrid/s4u/Mutex.hpp>
-#include <simgrid/s4u/conditionVariable.hpp>
-
-#include "xbt/base.h"
+#include "simgrid/s4u/conditionVariable.hpp"
 #include "xbt/swag.h"
-#include "xbt/xbt_os_thread.h"
-#include "src/simix/popping_private.h"
 
 namespace simgrid {
 namespace simix {
@@ -26,12 +19,12 @@ public:
   Mutex(Mutex const&) = delete;
   Mutex& operator=(Mutex const&) = delete;
 
-  void lock(smx_process_t issuer);
-  bool try_lock(smx_process_t issuer);
-  void unlock(smx_process_t issuer);
+  void lock(smx_actor_t issuer);
+  bool try_lock(smx_actor_t issuer);
+  void unlock(smx_actor_t issuer);
 
   bool locked = false;
-  smx_process_t owner = nullptr;
+  smx_actor_t owner = nullptr;
   // List of sleeping processes:
   xbt_swag_t sleeping = nullptr;
 
@@ -76,7 +69,7 @@ typedef struct s_smx_sem {
 } s_smx_sem_t;
 
 XBT_PRIVATE void SIMIX_post_synchro(smx_activity_t synchro);
-XBT_PRIVATE void SIMIX_synchro_stop_waiting(smx_process_t process, smx_simcall_t simcall);
+XBT_PRIVATE void SIMIX_synchro_stop_waiting(smx_actor_t process, smx_simcall_t simcall);
 XBT_PRIVATE void SIMIX_synchro_destroy(smx_activity_t synchro);
 XBT_PRIVATE void SIMIX_synchro_finish(smx_activity_t synchro);
 
@@ -90,4 +83,5 @@ 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 int SIMIX_sem_would_block(smx_sem_t sem);
 XBT_PRIVATE int SIMIX_sem_get_capacity(smx_sem_t sem);
+
 #endif