Lines Matching full:conn

117     TestMsgConn *conn = opaque;  in msg_retry()  local
118 assert(!hyperv_post_msg(conn->sint_route, &conn->msg)); in msg_retry()
123 TestMsgConn *conn = data; in msg_cb() local
131 aio_bh_schedule_oneshot(qemu_get_aio_context(), msg_retry, conn); in msg_cb()
138 TestMsgConn *conn = data; in msg_handler() local
141 conn->msg.header.message_type = msg->message_type; in msg_handler()
142 assert(msg->payload_size < sizeof(conn->msg.payload)); in msg_handler()
143 conn->msg.header.payload_size = msg->payload_size; in msg_handler()
144 memcpy(&conn->msg.payload, msg->payload, msg->payload_size); in msg_handler()
146 ret = hyperv_post_msg(conn->sint_route, &conn->msg); in msg_handler()
161 TestMsgConn *conn; in msg_conn_create() local
163 conn = g_new0(TestMsgConn, 1); in msg_conn_create()
164 assert(conn); in msg_conn_create()
166 conn->conn_id = conn_id; in msg_conn_create()
168 conn->sint_route = hyperv_sint_route_new(vp_index, sint, msg_cb, conn); in msg_conn_create()
169 assert(conn->sint_route); in msg_conn_create()
171 assert(!hyperv_set_msg_handler(conn->conn_id, msg_handler, conn)); in msg_conn_create()
173 QLIST_INSERT_HEAD(&dev->msg_conns, conn, le); in msg_conn_create()
178 TestMsgConn *conn; in msg_conn_destroy() local
180 QLIST_FOREACH(conn, &dev->msg_conns, le) { in msg_conn_destroy()
181 if (conn->conn_id == conn_id) { in msg_conn_destroy()
182 QLIST_REMOVE(conn, le); in msg_conn_destroy()
183 hyperv_set_msg_handler(conn->conn_id, NULL, NULL); in msg_conn_destroy()
184 hyperv_sint_route_unref(conn->sint_route); in msg_conn_destroy()
185 g_free(conn); in msg_conn_destroy()
194 TestEvtConn *conn = container_of(notifier, TestEvtConn, notifier); in evt_conn_handler() local
199 assert(!hyperv_set_event_flag(conn->sint_route, conn->conn_id)); in evt_conn_handler()
205 TestEvtConn *conn; in evt_conn_create() local
207 conn = g_new0(TestEvtConn, 1); in evt_conn_create()
208 assert(conn); in evt_conn_create()
210 conn->conn_id = conn_id; in evt_conn_create()
212 conn->sint_route = hyperv_sint_route_new(vp_index, sint, NULL, NULL); in evt_conn_create()
213 assert(conn->sint_route); in evt_conn_create()
215 assert(!event_notifier_init(&conn->notifier, false)); in evt_conn_create()
217 event_notifier_set_handler(&conn->notifier, evt_conn_handler); in evt_conn_create()
219 assert(!hyperv_set_event_flag_handler(conn_id, &conn->notifier)); in evt_conn_create()
221 QLIST_INSERT_HEAD(&dev->evt_conns, conn, le); in evt_conn_create()
226 TestEvtConn *conn; in evt_conn_destroy() local
228 QLIST_FOREACH(conn, &dev->evt_conns, le) { in evt_conn_destroy()
229 if (conn->conn_id == conn_id) { in evt_conn_destroy()
230 QLIST_REMOVE(conn, le); in evt_conn_destroy()
231 hyperv_set_event_flag_handler(conn->conn_id, NULL); in evt_conn_destroy()
232 event_notifier_set_handler(&conn->notifier, NULL); in evt_conn_destroy()
233 event_notifier_cleanup(&conn->notifier); in evt_conn_destroy()
234 hyperv_sint_route_unref(conn->sint_route); in evt_conn_destroy()
235 g_free(conn); in evt_conn_destroy()