From: "Johannes Lorenz" <johannes89@mailueberfall.de>
To: alsa-devel@alsa-project.org
Subject: parallel, real time safe waiting?
Date: Mon, 13 Apr 2015 19:56:02 +0200 [thread overview]
Message-ID: <trinity-43de15d6-c64e-46fe-80ab-acaeb4930fc6-1428947762351@3capp-gmx-bs04> (raw)
Hello,
I'd like to write a sequencer that can handle many synthesizers. Thus, I want them to run these synths parallel. Still, I'd like to keep my code real time safe, i.e. no malloc(), usleep(), ofstream, pthread mutexes etc. However, I wondered how to let all my threads sleep for x useconds if there's nothing to do for x useconds.
My idea was:
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?
b) race-condition free, assuming I'll use pairwise different handles each thread
Many thanks for any help.
Kind regards,
Johannes
next reply other threads:[~2015-04-13 17:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-13 17:56 Johannes Lorenz [this message]
2015-04-14 12:35 ` parallel, real time safe waiting? Clemens Ladisch
2015-04-14 18:39 Johannes Lorenz
2015-04-14 19:49 ` Clemens Ladisch
2015-04-14 20:03 Johannes Lorenz
2015-04-15 7:52 ` Clemens Ladisch
2015-04-15 15:51 Johannes Lorenz
2015-04-15 19:41 ` Clemens Ladisch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=trinity-43de15d6-c64e-46fe-80ab-acaeb4930fc6-1428947762351@3capp-gmx-bs04 \
--to=johannes89@mailueberfall.de \
--cc=alsa-devel@alsa-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.