Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Convert enum smpi_process_state to enum class.
[simgrid.git] / src / simix / smx_synchro_private.hpp
1 /* Copyright (c) 2012-2018. The SimGrid Team. All rights reserved.          */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #ifndef SIMIX_SYNCHRO_PRIVATE_H
7 #define SIMIX_SYNCHRO_PRIVATE_H
8
9 #include "simgrid/s4u/ConditionVariable.hpp"
10 #include "src/simix/ActorImpl.hpp"
11 #include <boost/intrusive/list.hpp>
12
13 smx_activity_t SIMIX_synchro_wait(sg_host_t smx_host, double timeout);
14
15 struct s_smx_sem_t {
16   unsigned int value;
17   simgrid::kernel::actor::SynchroList sleeping; /* list of sleeping processes */
18 };
19
20 XBT_PRIVATE void SIMIX_synchro_stop_waiting(smx_actor_t process, smx_simcall_t simcall);
21 XBT_PRIVATE void SIMIX_synchro_finish(smx_activity_t synchro);
22
23 XBT_PRIVATE XBT_PRIVATE smx_sem_t SIMIX_sem_init(unsigned int value);
24 XBT_PRIVATE void SIMIX_sem_release(smx_sem_t sem);
25 XBT_PRIVATE int SIMIX_sem_would_block(smx_sem_t sem);
26 XBT_PRIVATE int SIMIX_sem_get_capacity(smx_sem_t sem);
27
28 #endif