1 /* Copyright (c) 2007-2023. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
6 #ifndef SIMGRID_SIMIX_H
7 #define SIMGRID_SIMIX_H
9 #include <simgrid/forward.h>
11 // avoid deprecation warning on include (remove entire file with XBT_ATTRIB_DEPRECATED_v335)
12 #ifndef SIMIX_H_NO_DEPRECATED_WARNING
13 #warning simgrid/simix.h is deprecated and will be removed in v3.35.
18 /******************************************************************************/
20 /******************************************************************************/
21 /* These functions are a system call-like interface to the simulation kernel. */
22 /* They can also be called from maestro's context, and they are thread safe. */
23 /******************************************************************************/
25 /************************** Communication simcalls ****************************/
27 XBT_ATTRIB_DEPRECATED_v335("Please use s4u::Comm::send()") XBT_PUBLIC
28 void simcall_comm_send(simgrid::kernel::actor::ActorImpl* sender, simgrid::kernel::activity::MailboxImpl* mbox,
29 double task_size, double rate, void* src_buff, size_t src_buff_size,
30 bool (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
31 void (*copy_data_fun)(simgrid::kernel::activity::CommImpl*, void*, size_t), void* data,
34 XBT_ATTRIB_DEPRECATED_v335("Please use s4u::Comm::isend()") XBT_PUBLIC simgrid::kernel::activity::ActivityImplPtr
35 simcall_comm_isend(simgrid::kernel::actor::ActorImpl* sender, simgrid::kernel::activity::MailboxImpl* mbox,
36 double task_size, double rate, void* src_buff, size_t src_buff_size,
37 bool (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*), void (*clean_fun)(void*),
38 void (*copy_data_fun)(simgrid::kernel::activity::CommImpl*, void*, size_t), void* data,
41 XBT_ATTRIB_DEPRECATED_v335("Please use s4u::Comm::recv()") XBT_PUBLIC
42 void simcall_comm_recv(simgrid::kernel::actor::ActorImpl* receiver, simgrid::kernel::activity::MailboxImpl* mbox,
43 void* dst_buff, size_t* dst_buff_size,
44 bool (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
45 void (*copy_data_fun)(simgrid::kernel::activity::CommImpl*, void*, size_t), void* data,
46 double timeout, double rate);
48 XBT_ATTRIB_DEPRECATED_v335("Please use s4u::Comm::irecv()") XBT_PUBLIC simgrid::kernel::activity::ActivityImplPtr
49 simcall_comm_irecv(simgrid::kernel::actor::ActorImpl* receiver, simgrid::kernel::activity::MailboxImpl* mbox,
50 void* dst_buff, size_t* dst_buff_size,
51 bool (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
52 void (*copy_data_fun)(simgrid::kernel::activity::CommImpl*, void*, size_t), void* data,
55 XBT_ATTRIB_DEPRECATED_v335("Please use s4u::Comm::wait_any_for()") XBT_PUBLIC ssize_t
56 simcall_comm_waitany(simgrid::kernel::activity::CommImpl* comms[], size_t count, double timeout);
57 XBT_ATTRIB_DEPRECATED_v335("Please use s4u::Comm::wait_for()") XBT_PUBLIC
58 void simcall_comm_wait(simgrid::kernel::activity::ActivityImpl* comm, double timeout);
59 XBT_ATTRIB_DEPRECATED_v335("Please use s4u::Comm::test()") XBT_PUBLIC
60 bool simcall_comm_test(simgrid::kernel::activity::ActivityImpl* comm);
61 XBT_ATTRIB_DEPRECATED_v335("Please use s4u::Comm::test_any()") XBT_PUBLIC ssize_t
62 simcall_comm_testany(simgrid::kernel::activity::CommImpl* comms[], size_t count);