mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 11:06:32 +01:00
Consolidate calls to `pthread_create' (2/2)
This commit is contained in:
parent
6a741689d1
commit
538a8cbccc
8 changed files with 22 additions and 29 deletions
|
|
@ -278,9 +278,7 @@ SystemExec::~SystemExec ()
|
|||
static void*
|
||||
interposer_thread (void *arg) {
|
||||
SystemExec *sex = static_cast<SystemExec *>(arg);
|
||||
pthread_set_name ("ExecStdOut");
|
||||
sex->output_interposer();
|
||||
pthread_exit(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -522,7 +520,7 @@ SystemExec::start (StdErrMode stderr_mode, const char * /*vfork_exec_wrapper*/)
|
|||
return -1;
|
||||
}
|
||||
|
||||
int rv = pthread_create (&thread_id_tt, NULL, interposer_thread, this);
|
||||
int rv = pthread_create_and_store ("ExecStdOut", &thread_id_tt, interposer_thread, this, 0);
|
||||
thread_active=true;
|
||||
if (rv) {
|
||||
thread_active=false;
|
||||
|
|
@ -560,7 +558,6 @@ SystemExec::output_interposer()
|
|||
ReadStdout(rv, bytesRead); /* EMIT SIGNAL */
|
||||
}
|
||||
Terminated(); /* EMIT SIGNAL */
|
||||
pthread_exit(0);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -808,7 +805,7 @@ SystemExec::start (StdErrMode stderr_mode, const char *vfork_exec_wrapper)
|
|||
close_fd (pout[1]);
|
||||
close_fd (pin[0]);
|
||||
|
||||
int rv = pthread_create (&thread_id_tt, NULL, interposer_thread, this);
|
||||
int rv = pthread_create_and_store ("ExecStdOut", &thread_id_tt, interposer_thread, this, 0);
|
||||
thread_active=true;
|
||||
|
||||
if (rv) {
|
||||
|
|
@ -917,7 +914,6 @@ again:
|
|||
ReadStdout (rv, r); /* EMIT SIGNAL */
|
||||
}
|
||||
Terminated (); /* EMIT SIGNAL */
|
||||
pthread_exit (0);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue