XBT:
- Drop simgrid::xbt::demangle. Please use boost::core::demangle instead.
+C binding and interface:
+ - Rename (lowercase) functions sg_actor_get_PID, sg_actor_get_PPID, sg_actor_by_PID.
+
Documentation:
- New section: Configuring the logs from the command line.
- New section: Programming API of logs.
.. group-tab:: C
- .. doxygenfunction:: sg_actor_by_PID(aid_t pid)
+ .. doxygenfunction:: sg_actor_by_pid(aid_t pid)
.. doxygenfunction:: sg_actor_self()
Querying info
.. group-tab:: C
.. doxygenfunction:: sg_actor_get_name(const_sg_actor_t actor)
- .. doxygenfunction:: sg_actor_get_PID(const_sg_actor_t actor)
- .. doxygenfunction:: sg_actor_get_PPID(const_sg_actor_t actor)
+ .. doxygenfunction:: sg_actor_get_pid(const_sg_actor_t actor)
+ .. doxygenfunction:: sg_actor_get_ppid(const_sg_actor_t actor)
.. doxygenfunction:: sg_actor_get_properties(const_sg_actor_t actor)
.. doxygenfunction:: sg_actor_get_property_value(const_sg_actor_t actor, const char *name)
XBT_PUBLIC void sg_actor_exit();
XBT_PUBLIC void sg_actor_on_exit(void_f_int_pvoid_t fun, void* data);
-XBT_PUBLIC aid_t sg_actor_get_PID(const_sg_actor_t actor);
-XBT_PUBLIC aid_t sg_actor_get_PPID(const_sg_actor_t actor);
-XBT_PUBLIC sg_actor_t sg_actor_by_PID(aid_t pid);
+XBT_PUBLIC aid_t sg_actor_get_pid(const_sg_actor_t actor);
+XBT_PUBLIC aid_t sg_actor_get_ppid(const_sg_actor_t actor);
+XBT_PUBLIC sg_actor_t sg_actor_by_pid(aid_t pid);
+XBT_ATTRIB_DEPRECATED_v331("Please use sg_actor_get_pid() instead") XBT_PUBLIC aid_t
+ sg_actor_get_PID(const_sg_actor_t actor);
+XBT_ATTRIB_DEPRECATED_v331("Please use sg_actor_get_ppid() instead") XBT_PUBLIC aid_t
+ sg_actor_get_PPID(const_sg_actor_t actor);
+XBT_ATTRIB_DEPRECATED_v331("Please use sg_actor_by_pid() instead") XBT_PUBLIC sg_actor_t sg_actor_by_PID(aid_t pid);
XBT_PUBLIC const char* sg_actor_get_name(const_sg_actor_t actor);
XBT_PUBLIC sg_host_t sg_actor_get_host(const_sg_actor_t actor);
XBT_PUBLIC const char* sg_actor_get_property_value(const_sg_actor_t actor, const char* name);
JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Process_fromPID(JNIEnv * env, jclass cls, jint pid)
{
- auto const* actor = sg_actor_by_PID(pid);
+ auto const* actor = sg_actor_by_pid(pid);
if (not actor) {
jxbt_throw_process_not_found(env, std::string("PID = ") + std::to_string(static_cast<int>(pid)));
JNIEXPORT jint JNICALL Java_org_simgrid_msg_Process_nativeGetPID(JNIEnv* env, jobject jprocess)
{
const_sg_actor_t actor = jprocess_to_native(jprocess, env);
- return sg_actor_get_PID(actor);
+ return sg_actor_get_pid(actor);
}
JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Process_getProperty(JNIEnv *env, jobject jprocess, jobject jname) {
int MSG_process_get_PID(const_sg_actor_t actor)
{
- return sg_actor_get_PID(actor);
+ return sg_actor_get_pid(actor);
}
int MSG_process_get_PPID(const_sg_actor_t actor)
{
- return sg_actor_get_PPID(actor);
+ return sg_actor_get_ppid(actor);
}
-msg_process_t MSG_process_from_PID(int PID)
+msg_process_t MSG_process_from_PID(int pid)
{
- return sg_actor_by_PID(PID);
+ return sg_actor_by_pid(pid);
}
const char* MSG_process_get_name(const_sg_actor_t actor)
{
* This function checks whether @a actor is a valid pointer and return its PID (or 0 in case of problem).
*/
-aid_t sg_actor_get_PID(const_sg_actor_t actor)
+aid_t sg_actor_get_pid(const_sg_actor_t actor)
{
/* Do not raise an exception here: this function is called by the logs
* and the exceptions, so it would be called back again and again */
* This function checks whether @a actor is a valid pointer and return its parent's PID.
* Returns -1 if the actor has not been created by any other actor.
*/
-aid_t sg_actor_get_PPID(const_sg_actor_t actor)
+aid_t sg_actor_get_ppid(const_sg_actor_t actor)
{
return actor->get_ppid();
}
* If none is found, @c nullptr is returned.
Note that the PID are unique in the whole simulation, not only on a given host.
*/
-sg_actor_t sg_actor_by_PID(aid_t pid)
+sg_actor_t sg_actor_by_pid(aid_t pid)
{
return simgrid::s4u::Actor::by_pid(pid).get();
}
+aid_t sg_actor_get_PID(const_sg_actor_t actor) // XBT_ATTRIB_DEPRECATED_v331
+{
+ return sg_actor_get_pid(actor);
+}
+
+aid_t sg_actor_get_PPID(const_sg_actor_t actor) // XBT_ATTRIB_DEPRECATED_v331
+{
+ return sg_actor_get_ppid(actor);
+}
+
+sg_actor_t sg_actor_by_PID(aid_t pid) // XBT_ATTRIB_DEPRECATED_v331
+{
+ return sg_actor_by_pid(pid);
+}
+
/** @brief Return the name of an actor. */
const char* sg_actor_get_name(const_sg_actor_t actor)
{