Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
If it is a win plateform we have to use wenvironment against environment.
[simgrid.git] / src / gras / Msg / rl_msg.c
index 7a277cb..ff6769f 100644 (file)
@@ -1,6 +1,7 @@
 /* messaging - Function related to messaging code specific to RL            */
 
-/* Copyright (c) 2003-2005 Martin Quinson. All rights reserved.             */
+/* Copyright (c) 2005, 2006, 2007, 2009, 2010. 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. */
 XBT_LOG_EXTERNAL_CATEGORY(gras_msg);
 XBT_LOG_DEFAULT_CATEGORY(gras_msg);
 
+void gras_msg_recv(gras_socket_t sock, gras_msg_t msg);
+
+gras_msg_t gras_msg_recv_any(void) {
+  gras_msg_t msg = xbt_new0(s_gras_msg_t,1);
+  msg->expe = gras_trp_select(-1);
+  DEBUG0("Select returned something");
+  gras_msg_recv(msg->expe, msg);
+  return msg;
+}
+
 void gras_msg_send_ext(gras_socket_t sock,
                        e_gras_msg_kind_t kind,
                        unsigned long int ID,