typedef simgrid::s4u::As simgrid_As;
typedef simgrid::s4u::Host simgrid_Host;
-typedef boost::intrusive_ptr<simgrid::s4u::Mailbox> sg_mbox_t;
typedef simgrid::kernel::activity::ActivityImpl kernel_Activity;
typedef simgrid::kernel::routing::NetCard routing_NetCard;
typedef simgrid::surf::Cpu surf_Cpu;
typedef struct simgrid_As simgrid_As;
typedef struct simgrid_Host simgrid_Host;
-typedef struct simgrid_Mailbox *sg_mbox_t;
typedef struct kernel_Activity kernel_Activity;
typedef struct surf_Cpu surf_Cpu;
typedef struct routing_NetCard routing_NetCard;
}} // namespace simgrid::s4u
-XBT_PUBLIC(sg_mbox_t) sg_mbox_by_name(const char*name);
-XBT_PUBLIC(int) sg_mbox_is_empty(sg_mbox_t mbox);
-XBT_PUBLIC(void)sg_mbox_setReceiver(sg_mbox_t mbox, smx_process_t process);
-
#endif /* SIMGRID_S4U_MAILBOX_HPP */
}
}
-
-/*------- C functions -------*/
-
-sg_mbox_t sg_mbox_by_name(const char*name){
- return simgrid::s4u::Mailbox::byName(name).get();
-}
-int sg_mbox_is_empty(sg_mbox_t mbox) {
- return mbox->empty();
-}
-void sg_mbox_setReceiver(sg_mbox_t mbox, smx_process_t process) {
- mbox->setReceiver(&process->getIface());
-}