diff -r 823aea72606b include/flounder/flounder_support_ump.h --- a/include/flounder/flounder_support_ump.h Tue Jan 17 11:31:21 2012 -0800 +++ b/include/flounder/flounder_support_ump.h Wed Jan 18 11:08:52 2012 -0800 @@ -31,7 +31,7 @@ struct flounder_ump_state { struct ump_chan chan; - ump_index_t sent_id; ///< Sequence number of next message to be sent + ump_index_t next_id; ///< Sequence number of next message to be sent ump_index_t seq_id; ///< Last sequence number received from remote ump_index_t ack_id; ///< Last sequence number acknowledged by remote ump_index_t last_ack; ///< Last acknowledgement we sent to remote @@ -57,7 +57,7 @@ /// Computes (from seq/ack numbers) whether we can currently send on the channel static inline bool flounder_stub_ump_can_send(struct flounder_ump_state *s) { - return (ump_index_t)(s->sent_id - s->ack_id) < s->chan.max_send_msgs; + return (ump_index_t)(s->next_id - s->ack_id) <= s->chan.max_send_msgs; } #define ENABLE_MESSAGE_PASSING_TRACE 1 @@ -69,13 +69,13 @@ #if ENABLE_MESSAGE_PASSING_TRACE trace_event_raw((((uint64_t)0xEA)<<56) | ((uint64_t)s->chan.sendid << 12) | - (s->sent_id & 0xffff)); + (s->next_id & 0xffff)); #endif // ENABLE_MESSAGE_PASSING_TRACE assert(s->chan.sendid != 0); assert(msgtype < (1 << FL_UMP_MSGTYPE_BITS)); // check for overflow ctrl->header = ((uintptr_t)msgtype << UMP_INDEX_BITS) | (uintptr_t)s->seq_id; s->last_ack = s->seq_id; - s->sent_id++; + s->next_id++; } /// Process a "control" word diff -r 823aea72606b lib/barrelfish/flounder_support.c --- a/lib/barrelfish/flounder_support.c Tue Jan 17 11:31:21 2012 -0800 +++ b/lib/barrelfish/flounder_support.c Wed Jan 18 11:08:52 2012 -0800 @@ -358,7 +358,7 @@ void flounder_stub_ump_state_init(struct flounder_ump_state *s, void *binding) { - s->sent_id = 0; + s->next_id = 1; s->seq_id = 0; s->ack_id = 0; s->last_ack = 0;