/* Initiliaze data segment to default value */
SIMIX_segment_index_set(process, -1);
- if (parent_process != nullptr) {
- process->ppid = SIMIX_process_get_PID(parent_process);
- /* SMPI process have their own data segment and
- each other inherit from their father */
+ if (parent_process != nullptr) {
+ process->ppid = parent_process->pid;
+ /* SMPI process have their own data segment and each other inherit from their father */
#if HAVE_SMPI
- if(smpi_privatize_global_variables){
- if( parent_process->pid != 0){
+ if( smpi_privatize_global_variables) {
+ if (parent_process->pid != 0) {
SIMIX_segment_index_set(process, parent_process->segment_index);
} else {
SIMIX_segment_index_set(process, process->pid - 1);
/* Initiliaze data segment to default value */
SIMIX_segment_index_set(process, -1);
if (parent_process != nullptr) {
- process->ppid = SIMIX_process_get_PID(parent_process);
- /* SMPI process have their own data segment and
- each other inherit from their father */
+ process->ppid = parent_process->pid;
+ /* SMPI process have their own data segment and each other inherit from their father */
#if HAVE_SMPI
- if(smpi_privatize_global_variables){
- if(parent_process->pid != 0){
+ if (smpi_privatize_global_variables) {
+ if (parent_process->pid != 0) {
SIMIX_segment_index_set(process, parent_process->segment_index);
} else {
SIMIX_segment_index_set(process, process->pid - 1);
return xbt_swag_size(simix_global->process_list);
}
-int SIMIX_process_get_PID(smx_process_t self){
+int SIMIX_process_get_PID(smx_process_t self)
+{
if (self == nullptr)
return 0;
else
return self->pid;
}
-int SIMIX_process_get_PPID(smx_process_t self){
- if (self == nullptr)
- return 0;
- else
- return self->ppid;
-}
-
void* SIMIX_process_self_get_data()
{
smx_process_t self = SIMIX_process_self();
if (process == nullptr || process == simix_global->maestro_process)
return "maestro";
- return SIMIX_process_get_name(process);
-}
-
-const char* SIMIX_process_get_name(smx_process_t process)
-{
return process->name.c_str();
}