From a2354db3230d0e9408b455ca1c0eab361a33b319 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 9 Feb 2011 02:51:50 +0000 Subject: [PATCH] make a note about process lock and ARDOUR::how_many_dsp_threads() git-svn-id: svn://localhost/ardour2/branches/3.0@8794 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/utils.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/ardour/utils.cc b/libs/ardour/utils.cc index b19aad4fa9..2ea8b73dc2 100644 --- a/libs/ardour/utils.cc +++ b/libs/ardour/utils.cc @@ -657,6 +657,8 @@ matching_unsuffixed_filename_exists_in (const string& dir, const string& path) uint32_t how_many_dsp_threads () { + /* CALLER MUST HOLD PROCESS LOCK */ + int num_cpu = hardware_concurrency(); int pu = Config->get_processor_usage (); uint32_t num_threads = max (num_cpu - 1, 2); // default to number of cpus minus one, or 2, whichever is larger