-/* 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"
+#include "src/simix/smx_synchro_private.hpp"
#include "src/surf/surf_interface.hpp"
-#include "src/simix/smx_synchro_private.h"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_synchro);
#include <xbt/functional.hpp>
-#include "src/internal_config.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 "xbt/swag.h"
+#include "xbt/config.h"
#include "xbt/dict.h"
+#include "xbt/function_types.h"
#include "xbt/mallocator.h"
-#include "xbt/config.h"
+#include "xbt/swag.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 "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 {
-/* 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. */
-#include "xbt/log.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"
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;
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_;
};
-
}
}
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;
- 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);
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_t* cond);
+XBT_PRIVATE void intrusive_ptr_release(s_smx_cond_t* cond);
XBT_PRIVATE XBT_PRIVATE smx_sem_t SIMIX_sem_init(unsigned int value);
XBT_PRIVATE void SIMIX_sem_release(smx_sem_t sem);
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