A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[mc] Fetch simix_process_maxpid from MCed
[simgrid.git]
/
src
/
simix
/
smx_process.c
diff --git
a/src/simix/smx_process.c
b/src/simix/smx_process.c
index
c70f33a
..
9d6e02b
100644
(file)
--- a/
src/simix/smx_process.c
+++ b/
src/simix/smx_process.c
@@
-9,6
+9,7
@@
#include "xbt/log.h"
#include "xbt/dict.h"
#include "mc/mc.h"
#include "xbt/log.h"
#include "xbt/dict.h"
#include "mc/mc.h"
+#include "mc/mc_client.h"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_process, simix,
"Logging specific to SIMIX (process)");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_process, simix,
"Logging specific to SIMIX (process)");
@@
-38,9
+39,6
@@
int SIMIX_process_has_pending_comms(smx_process_t process) {
return xbt_fifo_size(process->comms) > 0;
}
return xbt_fifo_size(process->comms) > 0;
}
-void simcall_HANDLER_process_cleanup(smx_simcall_t simcall, smx_process_t process) {
- SIMIX_process_cleanup(process);
-}
/**
* \brief Moves a process to the list of processes to destroy.
*/
/**
* \brief Moves a process to the list of processes to destroy.
*/
@@
-588,18
+586,11
@@
int SIMIX_process_get_maxpid(void) {
return simix_process_maxpid;
}
return simix_process_maxpid;
}
-int simcall_HANDLER_process_count(smx_simcall_t simcall){
- return SIMIX_process_count();
-}
int SIMIX_process_count(void)
{
return xbt_swag_size(simix_global->process_list);
}
int SIMIX_process_count(void)
{
return xbt_swag_size(simix_global->process_list);
}
-int simcall_HANDLER_process_get_PID(smx_simcall_t simcall, smx_process_t self){
- return SIMIX_process_get_PID(self);
-}
-
int SIMIX_process_get_PID(smx_process_t self){
if (self == NULL)
return 0;
int SIMIX_process_get_PID(smx_process_t self){
if (self == NULL)
return 0;
@@
-607,10
+598,6
@@
int SIMIX_process_get_PID(smx_process_t self){
return self->pid;
}
return self->pid;
}
-int simcall_HANDLER_process_get_PPID(smx_simcall_t simcall, smx_process_t self){
- return SIMIX_process_get_PPID(self);
-}
-
int SIMIX_process_get_PPID(smx_process_t self){
if (self == NULL)
return 0;
int SIMIX_process_get_PPID(smx_process_t self){
if (self == NULL)
return 0;
@@
-628,10
+615,6
@@
void* SIMIX_process_self_get_data(smx_process_t self)
return SIMIX_process_get_data(self);
}
return SIMIX_process_get_data(self);
}
-void simcall_HANDLER_process_set_data(smx_simcall_t simcall, smx_process_t process,
- void *data){
- SIMIX_process_set_data(process, data);
-}
void SIMIX_process_self_set_data(smx_process_t self, void *data)
{
xbt_assert(self == SIMIX_process_self(), "This is not the current process");
void SIMIX_process_self_set_data(smx_process_t self, void *data)
{
xbt_assert(self == SIMIX_process_self(), "This is not the current process");
@@
-639,9
+622,6
@@
void SIMIX_process_self_set_data(smx_process_t self, void *data)
SIMIX_process_set_data(self, data);
}
SIMIX_process_set_data(self, data);
}
-void* simcall_HANDLER_process_get_data(smx_simcall_t simcall, smx_process_t process){
- return SIMIX_process_get_data(process);
-}
void* SIMIX_process_get_data(smx_process_t process)
{
return process->data;
void* SIMIX_process_get_data(smx_process_t process)
{
return process->data;
@@
-652,9
+632,6
@@
void SIMIX_process_set_data(smx_process_t process, void *data)
process->data = data;
}
process->data = data;
}
-smx_host_t simcall_HANDLER_process_get_host(smx_simcall_t simcall, smx_process_t process){
- return SIMIX_process_get_host(process);
-}
smx_host_t SIMIX_process_get_host(smx_process_t process)
{
return process->smx_host;
smx_host_t SIMIX_process_get_host(smx_process_t process)
{
return process->smx_host;
@@
-671,9
+648,6
@@
const char* SIMIX_process_self_get_name(void) {
return SIMIX_process_get_name(process);
}
return SIMIX_process_get_name(process);
}
-const char* simcall_HANDLER_process_get_name(smx_simcall_t simcall, smx_process_t process) {
- return SIMIX_process_get_name(process);
-}
const char* SIMIX_process_get_name(smx_process_t process)
{
return process->name;
const char* SIMIX_process_get_name(smx_process_t process)
{
return process->name;
@@
-691,17
+665,11
@@
smx_process_t SIMIX_process_get_by_name(const char* name)
return NULL;
}
return NULL;
}
-int simcall_HANDLER_process_is_suspended(smx_simcall_t simcall, smx_process_t process){
- return SIMIX_process_is_suspended(process);
-}
int SIMIX_process_is_suspended(smx_process_t process)
{
return process->suspended;
}
int SIMIX_process_is_suspended(smx_process_t process)
{
return process->suspended;
}
-xbt_dict_t simcall_HANDLER_process_get_properties(smx_simcall_t simcall, smx_process_t process){
- return SIMIX_process_get_properties(process);
-}
xbt_dict_t SIMIX_process_get_properties(smx_process_t process)
{
return process->properties;
xbt_dict_t SIMIX_process_get_properties(smx_process_t process)
{
return process->properties;
@@
-747,7
+715,7
@@
smx_synchro_t SIMIX_process_join(smx_process_t issuer, smx_process_t process, do
void simcall_HANDLER_process_sleep(smx_simcall_t simcall, double duration)
{
void simcall_HANDLER_process_sleep(smx_simcall_t simcall, double duration)
{
- if (MC_is_active()) {
+ if (MC_is_active()
|| MC_record_replay_is_active()
) {
MC_process_clock_add(simcall->issuer, duration);
simcall_process_sleep__set__result(simcall, SIMIX_DONE);
SIMIX_simcall_answer(simcall);
MC_process_clock_add(simcall->issuer, duration);
simcall_process_sleep__set__result(simcall, SIMIX_DONE);
SIMIX_simcall_answer(simcall);
@@
-959,11
+927,6
@@
void SIMIX_process_on_exit_runall(smx_process_t process) {
}
}
}
}
-void simcall_HANDLER_process_on_exit(smx_simcall_t simcall, smx_process_t process,
- int_f_pvoid_pvoid_t fun, void *data) {
- SIMIX_process_on_exit(process, fun, data);
-}
-
void SIMIX_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void *data) {
xbt_assert(process, "current process not found: are you in maestro context ?");
void SIMIX_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void *data) {
xbt_assert(process, "current process not found: are you in maestro context ?");
@@
-976,10
+939,6
@@
void SIMIX_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void
xbt_dynar_push_as(process->on_exit,s_smx_process_exit_fun_t,exit_fun);
}
xbt_dynar_push_as(process->on_exit,s_smx_process_exit_fun_t,exit_fun);
}
-void simcall_HANDLER_process_auto_restart_set(smx_simcall_t simcall, smx_process_t process,
- int auto_restart) {
- SIMIX_process_auto_restart_set(process, auto_restart);
-}
/**
* \brief Sets the auto-restart status of the process.
* If set to 1, the process will be automatically restarted when its host
/**
* \brief Sets the auto-restart status of the process.
* If set to 1, the process will be automatically restarted when its host