From ffc784d0a7d4b10e9ee73d12a4c355e2644e9afa Mon Sep 17 00:00:00 2001 From: pini Date: Mon, 14 Mar 2011 14:47:43 +0000 Subject: [PATCH] Add wrapper to match receiving mailboxes against a user-provided filter git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9789 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- include/simix/simix.h | 1 + src/simix/smx_network.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/include/simix/simix.h b/include/simix/simix.h index e748910d6a..8505fd9e08 100644 --- a/include/simix/simix.h +++ b/include/simix/simix.h @@ -72,6 +72,7 @@ XBT_PUBLIC(void) SIMIX_process_set_context(smx_process_t p,smx_context_t c); XBT_PUBLIC(void) SIMIX_comm_set_copy_data_callback(void (*callback) (smx_action_t, size_t)); XBT_PUBLIC(void) SIMIX_comm_copy_pointer_callback(smx_action_t comm, size_t buff_size); XBT_PUBLIC(void) SIMIX_comm_copy_buffer_callback(smx_action_t comm, size_t buff_size); +XBT_PUBLIC(smx_action_t) SIMIX_comm_get_send_match(smx_rdv_t rdv, int (*match_fun)(void*, void*), void* data); /******************************************************************************/ /* SIMIX Smurf Proxy Functions */ diff --git a/src/simix/smx_network.c b/src/simix/smx_network.c index 0023ad9098..a795bd2db1 100644 --- a/src/simix/smx_network.c +++ b/src/simix/smx_network.c @@ -117,6 +117,10 @@ static XBT_INLINE void SIMIX_rdv_remove(smx_rdv_t rdv, smx_action_t comm) comm->comm.rdv = NULL; } +smx_action_t SIMIX_comm_get_send_match(smx_rdv_t rdv, int (*match_fun)(void*, void*), void* data) { + return SIMIX_rdv_get_request(rdv, SIMIX_COMM_SEND, match_fun, data); +} + /** * \brief Checks if there is a communication action queued in a rendez-vous matching our needs * \param type The type of communication we are looking for (comm_send, comm_recv) -- 2.20.1