Re: [linux-audio-dev] cycle counter wrapping

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] cycle counter wrapping
From: David Olofson (audiality_AT_swipnet.se)
Date: ke loka   13 1999 - 18:40:48 EDT


On Wed, 13 Oct 1999, Paul Barton-Davis wrote:
> >Like David's resyncronisation points (you do the resync when
> >no plugins run)
>
> alas, if it were that easy. but it isn't. by introducing this, you
> introduce the need for a lock around the timestamp code.

...but we *have* atomic pointer read/write, right? So it would be
possible for the resync code to fill in a struct and then change the
shared pointer to it. Note that it's a "soft" sync requirement, as
the old sync point struct is still valid - only a little less
accurate than the new one.

OK, it *is* possible that a thread that grabs the pointer, then
gets blocked, and wakes up just when the resync code is overwriting
the old struct. That is, the struct pointer you grab is only valid
for one resync cycle. However, if a sensor thread is scheduled out
for that long, that means that 1) it will get a very useless
timestamp anyway, and 2) the engine will sustain a drop out, as it's
supposed to have lower priority than the sensor thread...

//David

 ·A·U·D·I·A·L·I·T·Y· P r o f e s s i o n a l L i n u x A u d i o
- - ------------------------------------------------------------- - -
    ·Rock Solid David Olofson:
    ·Low Latency www.angelfire.com/or/audiality ·Audio Hacker
    ·Plug-Ins audiality_AT_swipnet.se ·Linux Advocate
    ·Open Source ·Singer/Composer


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : pe maalis 10 2000 - 07:27:59 EST