Ejemplo n.º 1
0
void tcpx_conn_mgr_close(struct tcpx_fabric *tcpx_fabric)
{
	struct poll_fd_info *poll_info;

	tcpx_fabric->poll_mgr.run = 0;
	fd_signal_set(&tcpx_fabric->poll_mgr.signal);

	if (tcpx_fabric->conn_mgr_thread &&
	    pthread_join(tcpx_fabric->conn_mgr_thread, NULL)) {
		FI_DBG(&tcpx_prov, FI_LOG_FABRIC,
		       "cm thread failed to join\n");
	}

	while (!dlist_empty(&tcpx_fabric->poll_mgr.list)) {
		poll_info = container_of(tcpx_fabric->poll_mgr.list.next,
					 struct poll_fd_info, entry);
		dlist_remove(&poll_info->entry);
		assert(poll_info->flags & POLL_MGR_FREE);
		free(poll_info);
	}

	fastlock_destroy(&tcpx_fabric->poll_mgr.lock);
	fd_signal_free(&tcpx_fabric->poll_mgr.signal);
}
Ejemplo n.º 2
0
static void util_wait_fd_signal(struct util_wait *util_wait)
{
	struct util_wait_fd *wait;
	wait = container_of(util_wait, struct util_wait_fd, util_wait);
	fd_signal_set(&wait->signal);
}