Ejemplo n.º 1
0
/*
 * =======================================
 * Allocation Technology
 * =======================================
 */
int
pqos_alloc_assoc_set(const unsigned lcore,
                     const unsigned class_id)
{
	int ret;

	_pqos_api_lock();

        ret = _pqos_check_init(1);
        if (ret != PQOS_RETVAL_OK) {
                _pqos_api_unlock();
                return ret;
        }

	if (m_interface == PQOS_INTER_MSR)
		ret = hw_alloc_assoc_set(lcore, class_id);
	else {
#ifdef __linux__
		ret = os_alloc_assoc_set(lcore, class_id);
#else
                LOG_INFO("OS interface not supported!\n");
                ret = PQOS_RETVAL_RESOURCE;
#endif
        }
	_pqos_api_unlock();

	return ret;
}
Ejemplo n.º 2
0
int pqos_alloc_assoc_set(const unsigned lcore,
                         const unsigned class_id)
{
	int ret;

	_pqos_api_lock();

        ret = _pqos_check_init(1);
        if (ret != PQOS_RETVAL_OK) {
                _pqos_api_unlock();
                return ret;
        }

	ret = hw_alloc_assoc_set(lcore, class_id);

	_pqos_api_unlock();

	return ret;
}