public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Richard Zidlicky <rz@linux-m68k.org>
To: Peter Waechtler <pwaechtler@mac.com>
Cc: linux-kernel@vger.kernel.org, Linus Torvalds <torvalds@transmeta.com>
Subject: Re: [PATCH] 6/11 sound/oss replace cli()
Date: Mon, 23 Sep 2002 00:59:18 +0200	[thread overview]
Message-ID: <20020923005918.B1975@linux-m68k.org> (raw)
In-Reply-To: <50EF4A49-CDA2-11D6-8873-00039387C942@mac.com>; from pwaechtler@mac.com on Sat, Sep 21, 2002 at 10:40:08PM +0200

On Sat, Sep 21, 2002 at 10:40:08PM +0200, Peter Waechtler wrote:
> I left the IRQ handler as is: releasing and requesting an IRQ
> handler on every frame.

Thanks,
Richard

> 
> --- vanilla-2.5.36/sound/oss/dmasound/dmasound_q40.c	Sat Aug 10 
> 00:03:13 2002
> +++ linux-2.5-cli-oss/sound/oss/dmasound/dmasound_q40.c	Sat Sep 21 
> 18:53:15 2002
> @@ -459,28 +459,32 @@
>   		  */
>   	         return;
>   	}
> -	save_flags(flags); cli();
> +	spin_lock_irqsave(&dmasound.lock, flags);
>   	Q40PlayNextFrame(1);
> -	restore_flags(flags);
> +	spin_unlock_irqrestore_flags(&dmasound.lock, flags);
>   }
> 
>   static void Q40StereoInterrupt(int irq, void *dummy, struct pt_regs *fp)
>   {
> +	spin_lock(&dmasound.lock);
>           if (q40_sc>1){
>               *DAC_LEFT=*q40_pp++;
>   	    *DAC_RIGHT=*q40_pp++;
>   	    q40_sc -=2;
>   	    master_outb(1,SAMPLE_CLEAR_REG);
>   	}else Q40Interrupt();
> +	spin_unlock(&dmasound.lock);
>   }
>   static void Q40MonoInterrupt(int irq, void *dummy, struct pt_regs *fp)
>   {
> +	spin_lock(&dmasound.lock);
>           if (q40_sc>0){
>               *DAC_LEFT=*q40_pp;
>   	    *DAC_RIGHT=*q40_pp++;
>   	    q40_sc --;
>   	    master_outb(1,SAMPLE_CLEAR_REG);
>   	}else Q40Interrupt();
> +	spin_unlock(&dmasound.lock);
>   }
>   static void Q40Interrupt(void)
>   {

      reply	other threads:[~2002-09-22 23:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-21 20:40 [PATCH] 6/11 sound/oss replace cli() Peter Waechtler
2002-09-22 22:59 ` Richard Zidlicky [this message]

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=20020923005918.B1975@linux-m68k.org \
    --to=rz@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pwaechtler@mac.com \
    --cc=torvalds@transmeta.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox