Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reimplement s4u::Barrier natively, and make them visible from MC
[simgrid.git] / src / msg / msg_legacy.cpp
index eb5ce0c..54afa6f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004-2020. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2004-2022. 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. */
@@ -62,15 +62,15 @@ void MSG_process_on_exit(int_f_int_pvoid_t fun, void* data)
 
 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)
 {
@@ -219,11 +219,7 @@ void MSG_process_unref(const_sg_actor_t process)
 {
   sg_actor_unref(process);
 }
-/** @brief Return the current number MSG processes. */
-int MSG_process_get_number() // XBT_ATTRIB_DEPRECATED_v330
-{
-  return sg_actor_count();
-}
+
 /* ************************** NetZones *************************** */
 sg_netzone_t MSG_zone_get_root()
 {
@@ -254,65 +250,7 @@ void MSG_zone_get_hosts(const_sg_netzone_t zone, xbt_dynar_t whereto)
   sg_zone_get_hosts(zone, whereto);
 }
 
-/* ************************** Storages *************************** */
-const char* MSG_storage_get_name(const_sg_storage_t storage)
-{
-  return sg_storage_get_name(storage);
-}
-sg_storage_t MSG_storage_get_by_name(const char* name)
-{
-  return sg_storage_get_by_name(name);
-}
-xbt_dict_t MSG_storage_get_properties(const_sg_storage_t storage)
-{
-  return sg_storage_get_properties(storage);
-}
-void MSG_storage_set_property_value(sg_storage_t storage, const char* name, const char* value)
-{
-  sg_storage_set_property_value(storage, name, value);
-}
-const char* MSG_storage_get_property_value(const_sg_storage_t storage, const char* name)
-{
-  return sg_storage_get_property_value(storage, name);
-}
-xbt_dynar_t MSG_storages_as_dynar()
-{
-  return sg_storages_as_dynar();
-}
-void MSG_storage_set_data(sg_storage_t storage, void* data)
-{
-  sg_storage_set_data(storage, data);
-}
-void* MSG_storage_get_data(const_sg_storage_t storage)
-{
-  return sg_storage_get_data(storage);
-}
-const char* MSG_storage_get_host(const_sg_storage_t storage)
-{
-  return sg_storage_get_host(storage);
-}
-sg_size_t MSG_storage_read(sg_storage_t storage, sg_size_t size)
-{
-  return sg_storage_read(storage, size);
-}
-sg_size_t MSG_storage_write(sg_storage_t storage, sg_size_t size)
-{
-  return sg_storage_write(storage, size);
-}
-
 /* ************************** hosts *************************** */
-xbt_dynar_t MSG_hosts_as_dynar() // XBT_ATTRIB_DEPRECATED_v330
-{
-  size_t host_count = sg_host_count();
-  sg_host_t* list   = sg_host_list();
-
-  xbt_dynar_t res = xbt_dynar_new(sizeof(sg_host_t), nullptr);
-  for (size_t i = 0; i < host_count; i++)
-    xbt_dynar_push_as(res, sg_host_t, list[i]);
-  xbt_free(list);
-
-  return res;
-}
 size_t MSG_get_host_number()
 {
   return sg_host_count();
@@ -337,14 +275,6 @@ void MSG_host_set_data(sg_host_t host, void* data)
 {
   return sg_host_set_data(host, data);
 }
-xbt_dict_t MSG_host_get_mounted_storage_list(sg_host_t host) // XBT_ATTRIB_DEPRECATED_v330
-{
-  return sg_host_get_mounted_storage_list(host);
-}
-xbt_dynar_t MSG_host_get_attached_storage_lists(const_sg_host_t host)
-{
-  return sg_host_get_attached_storage_list(host);
-}
 double MSG_host_get_speed(const_sg_host_t host)
 {
   return sg_host_get_speed(host);
@@ -473,7 +403,7 @@ sg_bar_t MSG_barrier_init(unsigned int count)
   return sg_barrier_init(count);
 }
 
-void MSG_barrier_destroy(const_sg_bar_t bar)
+void MSG_barrier_destroy(sg_bar_t bar)
 {
   sg_barrier_destroy(bar);
 }