/** * @brief Start checks for finished operations in send/recv queues, * and post new sends/recvs if possible. * @param[in] me pointer to PE */ static void service_queues(tw_pe *me) { int changed; do { changed = test_q(&posted_recvs, me, recv_finish); changed |= test_q(&posted_sends, me, send_finish); changed |= recv_begin(me); changed |= send_begin(me); } while (changed); }
int main(int argc, char* argv[]) { test_list(); test_q(); test_stack(); return 0; }
void tw_net_send(tw_event *e) { tw_pe * me = e->src_lp->pe; int changed = 0; e->state.remote = 0; e->state.owner = TW_net_outq; tw_eventq_unshift(&outq, e); do { changed = test_q(&posted_sends, me, send_finish); changed |= send_begin(me); } while (changed); }