Re: [patch] voluntary-preempt-2.6.8.1-P1

From: Florian Schmidt
Date: Mon Aug 16 2004 - 08:00:11 EST


On Mon, 16 Aug 2004 07:17:10 -0400
Lee Revell <rlrevell@xxxxxxxxxxx> wrote:

> > But it seems that this wasn't the only thing causing an xrun on
> > jackd client startup. I will try to take another look at the jackd
> > source..
> >
>
> Ingo mentioned that possibly the mlockall issue resulted from both
> processes mapping some of the same pages, which was ruled out by using
> small test programs, but maybe that is what is going on here. A jack
> client and server by definition have to map some of the same pages.
>
> Would it be worthwhile to compile the jack client -static?

Here's a minimal jack client which does _not_ produce an xrun on startup
for me (it doesn't really do anything either).. Maybe the xruns are the
other clients fault and not really determined by the jack mechanisms.. I
will extend it step by step to do something functional.. maybe i'll find
out what change introduces xruns. compile with

g++ jack_test.cc `pkg-config jack --libs` -o jack_test


jack_test.cc:
----------------------
#include <jack/jack.h>
#include <iostream>

jack_client_t *client;
jack_port_t *port;

int process(jack_nframes_t frames, void *arg) {
return 0;
}

int main(int argc, char *argv[]) {
std::cout << "client_new" << std::endl;
client = jack_client_new("foo");

std::cout << "port_register." << std::endl;
port = jack_port_register(client, "foobar",
JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput|JackPortIsTerminal, 0);

std::cout << "set_process_callback" << std::endl;
jack_set_process_callback(client, process, 0);

std::cout << "activate" << std::endl;
jack_activate(client);

std::cout << "running" << std::endl;
while(1) {sleep(1);};
}
-----------------------


--
Palimm Palimm!
http://affenbande.org/~tapas/

#include <jack/jack.h>
#include <iostream>

jack_client_t *client;
jack_port_t *port;

int process(jack_nframes_t frames, void *arg) {
return 0;
}

int main(int argc, char *argv[]) {
std::cout << "client_new" << std::endl;
client = jack_client_new("foo");

std::cout << "port_register." << std::endl;
port = jack_port_register(client, "foobar", JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput|JackPortIsTerminal, 0);

std::cout << "set_process_callback" << std::endl;
jack_set_process_callback(client, process, 0);

std::cout << "activate" << std::endl;
jack_activate(client);

std::cout << "running" << std::endl;
while(1) {sleep(1);};
}