#include <msg/msg.h>
#include "hostdata.h"
-// Cannot include "options.h" without error, so only declare the
-// needed functions.
-namespace opt {
- bool parse_args(int* argc, char* argv[]);
- void print();
- void usage();
-}
-
class message {
public:
enum message_type { INFO, CREDIT, LOAD, CTRL_CLOSE, DATA_CLOSE };
void send(const char* dest, message* msg);
// Try to get a message. Returns true on success.
- // If "wait" is true, blocks until success.
- bool recv(message*& msg, m_host_t& from, bool wait);
+ // Parameter "timeout" may be 0 for non-blocking operation, -1 for
+ // infinite waiting, or any positive timeout.
+ bool recv(message*& msg, m_host_t& from, double timeout);
// Try to flush pending sending communications.
// If "wait" is true, blocks until success.
// Handling of receiving thread
m_process_t receiver_process;
static int receiver_wrapper(int, char* []);
+ void receiver1(msg_comm_t& comm, m_task_t& task, const char* mbox);
int receiver();
// Used to test if a communication is over, and to destroy it if it is