Example #1
0
/*
 *	Initialize the given processor_set structure.
 */
void
pset_init(
	processor_set_t		pset,
	pset_node_t			node)
{
	if (pset != &pset0) {
		/* Scheduler state for pset0 initialized in sched_init() */
		SCHED(pset_init)(pset);
		SCHED(rt_init)(pset);
	}

	queue_init(&pset->active_queue);
	queue_init(&pset->idle_queue);
	queue_init(&pset->idle_secondary_queue);
	queue_init(&pset->unused_queue);
	pset->online_processor_count = 0;
	pset->active_processor_count = 0;
	pset->load_average = 0;
	pset->cpu_set_low = pset->cpu_set_hi = 0;
	pset->cpu_set_count = 0;
	pset->cpu_bitmask = 0;
	pset->recommended_bitmask = ~0ULL;
	pset->pending_AST_cpu_mask = 0;
#if defined(CONFIG_SCHED_DEFERRED_AST)
	pset->pending_deferred_AST_cpu_mask = 0;
#endif
	pset->pending_spill_cpu_mask = 0;
	pset_lock_init(pset);
	pset->pset_self = IP_NULL;
	pset->pset_name_self = IP_NULL;
	pset->pset_list = PROCESSOR_SET_NULL;
	pset->node = node;
	pset->pset_cluster_type = PSET_SMP;
	pset->pset_cluster_id = 0;
}
Example #2
0
/*
 *	Initialize the given processor_set structure.
 */
void
pset_init(
	processor_set_t		pset,
	pset_node_t			node)
{
	queue_init(&pset->active_queue);
	queue_init(&pset->idle_queue);
	pset->processor_count = 0;
	pset->low_pri = pset->low_count = PROCESSOR_NULL;
	pset_lock_init(pset);
	pset->pset_self = IP_NULL;
	pset->pset_name_self = IP_NULL;
	pset->pset_list = PROCESSOR_SET_NULL;
	pset->node = node;
}