Report true error when tasklist threads cannot be created

pthreads doesn't use errno, so the error message was misleading.
This commit is contained in:
Matthias von Faber 2020-06-08 07:03:47 +02:00 committed by Robin Gareus
parent 630a3d07d2
commit 4b7efac3dc
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04

View file

@ -16,7 +16,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <cerrno>
#include <cstring>
#include "pbd/pthread_utils.h"
@ -92,7 +91,7 @@ RTTaskList::reset_thread_list ()
pbd_pthread_create (PBD_RT_STACKSIZE_HELP, &thread_id, _thread_run, this);
if (rv) {
PBD::fatal << _("Cannot create thread for TaskList! (") << strerror(errno) << ')' << endmsg;
PBD::fatal << _("Cannot create thread for TaskList! (") << strerror(rv) << ')' << endmsg;
/* NOT REACHED */
}
pbd_mach_set_realtime_policy (thread_id, 5. * 1e-5);