static void init_order(pcu_order o) { pcu_make_aa(&o->tree); o->array = 0; o->count = 0; o->ready = false; o->at = 0; }
static void free_messages(pcu_aa_tree* t) { if (pcu_aa_empty(*t)) return; free_messages(&((*t)->left)); free_messages(&((*t)->right)); struct message* m; m = (struct message*) *t; free_message(m); pcu_make_aa(t); }
static void free_peers(pcu_aa_tree* t) { if (pcu_aa_empty(*t)) return; free_peers(&((*t)->left)); free_peers(&((*t)->right)); pcu_msg_peer* peer; peer = (pcu_msg_peer*) *t; pcu_free_message(&(peer->message)); noto_free(peer); pcu_make_aa(t); }
static void make_comm(pcu_msg* m) { pcu_make_aa(&(m->peers)); pcu_make_message(&(m->received)); m->state = idle_state; }