Browse Source

[0.89.12] better fix for bug #000015

git-svn-id: svn+ssh://jackaudio.org/trunk/jack@562 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/0.109.0
joq 22 years ago
parent
commit
587a26fab5
2 changed files with 7 additions and 9 deletions
  1. +1
    -1
      configure.in
  2. +6
    -8
      libjack/driver.c

+ 1
- 1
configure.in View File

@@ -15,7 +15,7 @@ dnl changes are made
dnl ---
JACK_MAJOR_VERSION=0
JACK_MINOR_VERSION=89
JACK_MICRO_VERSION=11
JACK_MICRO_VERSION=12

dnl ---
dnl HOWTO: updating the jack protocal version


+ 6
- 8
libjack/driver.c View File

@@ -100,11 +100,7 @@ jack_driver_nt_detach (jack_driver_nt_t * driver, jack_engine_t * engine)
static int
jack_driver_nt_become_real_time (jack_driver_nt_t* driver)
{
/* On some systems the driver thread appears to start running
* before pthread_create() actually stores the nt_thread
* value. If so, that is probably a Linuxthreads bug. Using
* pthread_self() here seems to help. */
if (jack_acquire_real_time_scheduling (pthread_self(),
if (jack_acquire_real_time_scheduling (driver->nt_thread,
driver->engine->rtpriority)) {
return -1;
}
@@ -126,6 +122,11 @@ jack_driver_nt_thread (void * arg)
int rc = 0;
int run;

/* This thread may start running before pthread_create()
* actually stores the driver->nt_thread value. It's safer to
* store it here as well. */
driver->nt_thread = pthread_self();

if (driver->engine->control->real_time)
jack_driver_nt_become_real_time (driver);

@@ -165,9 +166,6 @@ jack_driver_nt_start (jack_driver_nt_t * driver)

driver->nt_run = DRIVER_NT_RUN;

/* On some systems the driver thread appears to start running
* before pthread_create() actually stores the nt_thread
* value. If so, that is probably a Linuxthreads bug. */
err = pthread_create (&driver->nt_thread, NULL,
jack_driver_nt_thread, driver);
if (err) {


Loading…
Cancel
Save