Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Modernize simcall mutex_lock.
[simgrid.git] / include / simgrid / simix.h
index 3c618e8..b7efc34 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2020. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2021. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -23,7 +23,8 @@ extern unsigned smx_context_guard_size;
 
 SG_BEGIN_DECL
 
-XBT_PUBLIC smx_actor_t SIMIX_process_from_PID(aid_t PID);
+XBT_ATTRIB_DEPRECATED_v331("Please use sg_actor_by_PID instead.") XBT_PUBLIC smx_actor_t
+    SIMIX_process_from_PID(aid_t PID);
 
 /* parallelism */
 XBT_PUBLIC int SIMIX_context_is_parallel();
@@ -198,9 +199,9 @@ XBT_ATTRIB_DEPRECATED_v330("Please use an ActivityImpl* for first parameter") in
 /************************** Synchro simcalls **********************************/
 SG_BEGIN_DECL
 XBT_ATTRIB_DEPRECATED_v330("Please use sg_mutex_init()") XBT_PUBLIC smx_mutex_t simcall_mutex_init();
-XBT_PUBLIC void simcall_mutex_lock(smx_mutex_t mutex);
-XBT_PUBLIC int simcall_mutex_trylock(smx_mutex_t mutex);
-XBT_PUBLIC void simcall_mutex_unlock(smx_mutex_t mutex);
+XBT_ATTRIB_DEPRECATED_v331("Please use sg_mutex_lock()") XBT_PUBLIC void simcall_mutex_lock(smx_mutex_t mutex);
+XBT_ATTRIB_DEPRECATED_v331("Please use sg_mutex_try_lock()") XBT_PUBLIC int simcall_mutex_trylock(smx_mutex_t mutex);
+XBT_ATTRIB_DEPRECATED_v331("Please use sg_mutex_unlock()") XBT_PUBLIC void simcall_mutex_unlock(smx_mutex_t mutex);
 
 XBT_ATTRIB_DEPRECATED_v330("Please use sg_cond_init()") XBT_PUBLIC smx_cond_t simcall_cond_init();
 XBT_PUBLIC void simcall_cond_wait(smx_cond_t cond, smx_mutex_t mutex);
@@ -223,7 +224,7 @@ XBT_ATTRIB_DEPRECATED_v330("Please use s4u::Io::test()") XBT_PUBLIC
 #endif
 /************************** MC simcalls   **********************************/
 SG_BEGIN_DECL
-XBT_PUBLIC int simcall_mc_random(int min, int max);
+XBT_ATTRIB_DEPRECATED_v331("Please use MC_random()") XBT_PUBLIC int simcall_mc_random(int min, int max);
 SG_END_DECL
 
 #endif