Re: [linux-audio-dev] questions to be resolved

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

Subject: Re: [linux-audio-dev] questions to be resolved
From: Abramo Bagnara (abramo_AT_alsa-project.org)
Date: Tue May 22 2001 - 00:43:44 EEST


Karl MacMillan wrote:
>
> On Mon, 21 May 2001, Abramo Bagnara wrote:
>
> > Abramo Bagnara wrote:
> > >
> > > readers and writer share the same memory that contains a copy of the
> > > object and two integer: begin and end.
> > >
> > > writers:
> > > pthread_mutex_lock
> > > begin++
> > > wmb()
> > > write to the area
> > > wmb()
> > > end++
> > > pthread_mutex_unlock
> > >
> > > reader:
> > > if (cookie != end) {
> > > cookie = end
> > > rmb()
> > > copy area to temp
> > > rmb()
> > > if (begin == end) {
> > ^^^^^^^^^^^^^^
> > sorry, typo cookie == begin
> >
> > > copy temp to object
> > > do what needed
> > > }
> > > }
> > >
> > > Can I patent this? ;-))
> > >
>
> This has a large number of unnecessary buffer copies that probably will
> not scale well. Have you looked at the other proposals that reduce buffer
> copying?

Buffer copies?? Are you sure to have followed the thread?
We are speaking about controls (in this specific case connections map).

I've two copy of a topology area every time user change it, this makes
you worry?

-- 
Abramo Bagnara                       mailto:abramo_AT_alsa-project.org

Opera Unica Phone: +39.546.656023 Via Emilia Interna, 140 48014 Castel Bolognese (RA) - Italy

ALSA project http://www.alsa-project.org It sounds good!


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

This archive was generated by hypermail 2b28 : Tue May 22 2001 - 01:30:19 EEST