Linux PARISC architecture development
 help / color / mirror / Atom feed
From: kyle@mcmartin.ca (Kyle McMartin)
To: Joel Soete <soete.joel@tiscali.be>
Cc: parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] memory barriers, spinlocks, debuglocks, oh my
Date: Sat, 28 Aug 2004 13:07:52 -0400	[thread overview]
Message-ID: <20040828170752.GS2414@mcmartin.ca> (raw)
In-Reply-To: <4130B995.4060201@tiscali.be>

On Sat, Aug 28, 2004 at 04:57:57PM +0000, Joel Soete wrote:
> #define SPIN_LOCK_IRQSAVE(l,f) ({            \
>        spinlock_t *s = ATOMIC_HASH(l);                 \
>        local_irq_save(f);                              \
>        spin_lock(s);                                   \
> })
> 
This form allows you to use SPIN_LOCK_IRQSAVE as an rvalue, as in

#define foo(a) ({ \
	int _b = 10;
	_b += a;
	_b;
})

baz = foo(10);
baz == 20;

Cheers,
-- 
Kyle McMartin
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

  reply	other threads:[~2004-08-28 17:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-27 16:37 [parisc-linux] memory barriers, spinlocks, debuglocks, oh my Kyle McMartin
     [not found] ` <1093625820.2010.26.camel@mulgrave>
     [not found]   ` <20040827170342.GD25975@baldric.uwo.ca>
2004-08-28 16:57     ` Joel Soete
2004-08-28 17:07       ` Kyle McMartin [this message]
2004-08-28 22:15 ` Kyle McMartin
2004-08-29 16:11   ` Joel Soete
2004-08-29 16:13     ` Kyle McMartin
2004-08-30  4:06       ` Grant Grundler
2004-08-30  4:14         ` Kyle McMartin
2004-08-30  4:30           ` Grant Grundler
2004-08-30  4:37             ` Kyle McMartin
2004-08-29 16:14     ` Thibaut VARENE
2004-08-29 17:45     ` John David Anglin

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=20040828170752.GS2414@mcmartin.ca \
    --to=kyle@mcmartin.ca \
    --cc=parisc-linux@lists.parisc-linux.org \
    --cc=soete.joel@tiscali.be \
    /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