src/dpdk/drivers/event/dlb2/pf/base/dlb2_osdep.h
static void *dlb2_complete_queue_map_unmap(void *__args)
{
	struct dlb2_dev *dlb2_dev = (struct dlb2_dev *)__args;
	int ret;

	while (1) {
		rte_spinlock_lock(&dlb2_dev->resource_mutex);

		ret = dlb2_finish_unmap_qid_procedures(&dlb2_dev->hw);
		ret += dlb2_finish_map_qid_procedures(&dlb2_dev->hw);

		if (ret != 0) {
			rte_spinlock_unlock(&dlb2_dev->resource_mutex);
			/* Relinquish the CPU so the application can process
			 * its CQs, so this function doesn't deadlock.
			 */
			sched_yield();
		} else {
			break;
		}
	}

	dlb2_dev->worker_launched = false;

	rte_spinlock_unlock(&dlb2_dev->resource_mutex);

	return NULL;
}
/* The callback runs until it completes all outstanding QID->CQ
 * map and unmap requests. To prevent deadlock, this function gives other
 * threads a chance to grab the resource mutex and configure hardware.
 */
The callback runs until it completes all outstanding QID->CQ
map and unmap requests. To prevent deadlock, this function gives other
threads a chance to grab the resource mutex and configure hardware.
The callback runs until it completes all outstanding QID - > CQ map and unmap requests . To prevent deadlock this function gives other threads a chance to grab the resource mutex and configure hardware .
static void *dlb2_complete_queue_map_unmap(void *__args)
{
	struct dlb2_dev *dlb2_dev = (struct dlb2_dev *)__args;
	int ret;
	while (1) {
		rte_spinlock_lock(&dlb2_dev->resource_mutex);
		ret = dlb2_finish_unmap_qid_procedures(&dlb2_dev->hw);
		ret += dlb2_finish_map_qid_procedures(&dlb2_dev->hw);
		if (ret != 0) {
			rte_spinlock_unlock(&dlb2_dev->resource_mutex);
			sched_yield();
		} else {
			break;
		}
	}
	dlb2_dev->worker_launched = false;
	rte_spinlock_unlock(&dlb2_dev->resource_mutex);
	return NULL;
}
static void * dlb2_complete_queue_map_unmap ( void * __args ) { struct dlb2_dev * dlb2_dev = ( struct dlb2_dev * ) __args ; int ret ; while ( 1 ) { rte_spinlock_lock ( & dlb2_dev -> resource_mutex ) ; ret = dlb2_finish_unmap_qid_procedures ( & dlb2_dev -> hw ) ; ret += dlb2_finish_map_qid_procedures ( & dlb2_dev -> hw ) ; if ( ret != 0 ) { rte_spinlock_unlock ( & dlb2_dev -> resource_mutex ) ; sched_yield ( ) ; } else { break ; } } dlb2_dev -> worker_launched = false ; rte_spinlock_unlock ( & dlb2_dev -> resource_mutex ) ; return NULL ; }
The callback runs until it completes all outstanding QID->CQ
 map and unmap requests.
The callback runs until it completes all outstanding QID - > CQ map and unmap requests .
/* Relinquish the CPU so the application can process
			 * its CQs, so this function doesn't deadlock.
			 */