X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/80aa60c52bb2ab930c3eb28b1417726717caf847..94a6ea22dbd2f12d1015925d3c3fe7a95b38d2e3:/src/simix/smx_process.cpp diff --git a/src/simix/smx_process.cpp b/src/simix/smx_process.cpp index b47211a5d4..bcd0600d2d 100644 --- a/src/simix/smx_process.cpp +++ b/src/simix/smx_process.cpp @@ -28,6 +28,21 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_process, simix, "Logging specific to SIMIX unsigned long simix_process_maxpid = 0; +/** Increase the refcount for this process */ +smx_process_t SIMIX_process_ref(smx_process_t process) +{ + if (process != nullptr) + intrusive_ptr_add_ref(process); + return process; +} + +/** Decrease the refcount for this process */ +void SIMIX_process_unref(smx_process_t process) +{ + if (process != nullptr) + intrusive_ptr_release(process); +} + /** * \brief Returns the current agent. *