Re: [alsa-devel] parallel, real time safe waiting?
1.) Let each thread open a handle using snd_seq_open() 2.) Call snd_pcm_wait() in each thread
Are these functions
a) real time safe?
snd_seq_open() is not, but why would that matter? Don't you call it from the GUI thread?
Ah, indeed, seq_open() is part of the initialization, so for this one, it does not matter.
b) race-condition free, assuming I'll use pairwise different handles each thread
Yes.
You're really 100 percent sure that this is guaranteed to work? Sorry for asking this :) I was expecting a "No, of course not.".
Also, this will probably work for all handle-based-functions, as long as you keep using pairwise different handles?
Regards, Johannes
Johannes Lorenz wrote:
b) race-condition free, assuming I'll use pairwise different handles each thread
Yes.
You're really 100 percent sure that this is guaranteed to work?
Of course. Not only does this page say so: http://www.alsa-project.org/main/index.php/SMP_Design but I also guaranteee to give your money back. ;-)
Regards, Clemens
participants (2)
-
Clemens Ladisch
-
Johannes Lorenz