- simcall->call = SIMCALL_PROCESS_COUNT;
- SIMIX_simcall_push(simcall->issuer);
- return simcall->process_count.result;
+/**
+ * \ingroup simix_process_management
+ * \brief Return the PID of a #smx_process_t.
+ * \param process a SIMIX process
+ * \return the PID of this process
+ */
+int simcall_process_get_PID(smx_process_t process)
+{
+ if (process == SIMIX_process_self()) {
+ /* avoid a simcall if this function is called by the process itself */
+ return SIMIX_process_get_PID(process);
+ }
+
+ return simcall_BODY_process_get_PID(process);
+}
+
+/**
+ * \ingroup simix_process_management
+ * \brief Return the parent PID of a #smx_process_t.
+ * \param process a SIMIX process
+ * \return the PID of this process parenrt
+ */
+int simcall_process_get_PPID(smx_process_t process)
+{
+ if (process == SIMIX_process_self()) {
+ /* avoid a simcall if this function is called by the process itself */
+ return SIMIX_process_get_PPID(process);
+ }
+
+ return simcall_BODY_process_get_PPID(process);