From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <440473CA.6000205@domain.hid> Date: Tue, 28 Feb 2006 17:01:14 +0100 From: Jan Kiszka MIME-Version: 1.0 Subject: Re: [Xenomai-help] resume/suspend periodic timing issue References: In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig4FF5CED441EEB8D7355ADE66" Sender: jan.kiszka@domain.hid List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Steven Seeger Cc: "xenomai@xenomai.org" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig4FF5CED441EEB8D7355ADE66 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Steven Seeger wrote: > Well, the thread suspends when it's done playing, and when new data arr= ives > in the buffer via /dev/dsp, the thread is then resumed. I just wonder w= hat > the point of suspend/resume is, then, if we're supposed to just use > rt_task_set_periodic to create a new timeline. Right now I am doing thi= s, > and then suspending, and then before I resume, I make another timeline.= >=20 Well, and this is racy in case the resume - for what reason ever - takes place before the suspend. It will get lost then, and your player will miss a job. One should better model this via an event (don't count multiple wakeups) or a semaphore (each wakeup counts and is paired with a wait in the player task). Jan --------------enig4FF5CED441EEB8D7355ADE66 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEBHPKniDOoMHTA+kRAp2/AJ4hYdJDiZzqSyv4vLuD4w2aMrXGZgCeLzhV U2BxIderPipovKPiH6oHoE4= =Zcc4 -----END PGP SIGNATURE----- --------------enig4FF5CED441EEB8D7355ADE66--