예제 #1
0
/**
 * @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);
}
예제 #2
0
파일: test.c 프로젝트: chengw1005/alg_ex
int main(int argc, char* argv[])
{
    test_list();

    test_q();

    test_stack();

    return 0;
}
예제 #3
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);
}