// Calculate the effective user-selected number of threads (also handles tricks with zero and negative values).
// Include standard_props_threads.inc to create the required ExpParams.threads field.

function getExpParamsThreads()
{
	if (ExpParams.threads>0)
		return ExpParams.threads;
	return Math.max(1,Simulator.cpus+ExpParams.threads);
}

