Lines Matching refs:t

162 	struct link_transaction *t;  in link_transaction_lookup()  local
164 list_for_each_entry(t, &pending_transaction_list, link) { in link_transaction_lookup()
165 if (t->request_node == request_node && in link_transaction_lookup()
166 t->response_node == response_node && in link_transaction_lookup()
167 t->tlabel == tlabel) in link_transaction_lookup()
168 return t; in link_transaction_lookup()
171 t = malloc(sizeof *t); in link_transaction_lookup()
172 if (!t) in link_transaction_lookup()
174 t->request_node = request_node; in link_transaction_lookup()
175 t->response_node = response_node; in link_transaction_lookup()
176 t->tlabel = tlabel; in link_transaction_lookup()
177 list_init(&t->request_list); in link_transaction_lookup()
178 list_init(&t->response_list); in link_transaction_lookup()
180 list_append(&pending_transaction_list, &t->link); in link_transaction_lookup()
182 return t; in link_transaction_lookup()
186 link_transaction_destroy(struct link_transaction *t) in link_transaction_destroy() argument
190 while (!list_empty(&t->request_list)) { in link_transaction_destroy()
191 sa = list_head(&t->request_list, struct subaction, link); in link_transaction_destroy()
195 while (!list_empty(&t->response_list)) { in link_transaction_destroy()
196 sa = list_head(&t->response_list, struct subaction, link); in link_transaction_destroy()
200 free(t); in link_transaction_destroy()
205 int (*decode)(struct link_transaction *t);
213 handle_transaction(struct link_transaction *t) in handle_transaction() argument
218 if (!t->request) { in handle_transaction()
224 if (protocol_decoders[i].decode(t)) in handle_transaction()
230 decode_link_packet(&t->request->packet, t->request->length, in handle_transaction()
232 if (t->response) in handle_transaction()
233 decode_link_packet(&t->response->packet, t->request->length, in handle_transaction()
239 list_for_each_entry(sa, &t->request_list, link) in handle_transaction()
241 list_for_each_entry(sa, &t->response_list, link) in handle_transaction()
246 link_transaction_destroy(t); in handle_transaction()
252 struct link_transaction *t; in clear_pending_transaction_list() local
255 t = list_head(&pending_transaction_list, in clear_pending_transaction_list()
257 list_remove(&t->link); in clear_pending_transaction_list()
258 link_transaction_destroy(t); in clear_pending_transaction_list()
486 struct link_transaction *t; in handle_request_packet() local
488 t = link_transaction_lookup(p->common.source, p->common.destination, in handle_request_packet()
491 t->request = sa; in handle_request_packet()
493 if (!list_empty(&t->request_list)) { in handle_request_packet()
494 prev = list_tail(&t->request_list, in handle_request_packet()
513 list_append(&t->request_list, &sa->link); in handle_request_packet()
520 list_remove(&t->link); in handle_request_packet()
521 handle_transaction(t); in handle_request_packet()
527 list_remove(&t->link); in handle_request_packet()
528 handle_transaction(t); in handle_request_packet()
551 struct link_transaction *t; in handle_response_packet() local
553 t = link_transaction_lookup(p->common.destination, p->common.source, in handle_response_packet()
555 if (list_empty(&t->request_list)) { in handle_response_packet()
560 t->response = sa; in handle_response_packet()
562 if (!list_empty(&t->response_list)) { in handle_response_packet()
563 prev = list_tail(&t->response_list, struct subaction, link); in handle_response_packet()
578 prev = list_tail(&t->request_list, struct subaction, link); in handle_response_packet()
592 list_append(&t->response_list, &sa->link); in handle_response_packet()
599 list_remove(&t->link); in handle_response_packet()
600 handle_transaction(t); in handle_response_packet()