public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Jackson <pj@sgi.com>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [patch 3/5] atomic: atomic_inc_not_zero
Date: Mon, 14 Nov 2005 08:29:56 -0800	[thread overview]
Message-ID: <20051114082956.609ff5cd.pj@sgi.com> (raw)
In-Reply-To: <4364178E.8040502@yahoo.com.au>

On Oct 30, and again on Nov 4, Nick wrote:

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Index: linux-2.6/arch/sparc/lib/atomic32.c
    ===================================================================
    --- linux-2.6.orig/arch/sparc/lib/atomic32.c
    +++ linux-2.6/arch/sparc/lib/atomic32.c
    @@ -52,6 +52,20 @@ int atomic_cmpxchg(atomic_t *v, int old,
	    return ret;
     }

    +int atomic_add_unless(atomic_t *v, int a, int u)
    +{
    +	int ret;
    +	unsigned long flags;
    +	spin_lock_irqsave(ATOMIC_HASH(v), flags);
    +	ret = v->counter;
    +	if (ret != u)
    +		v->counter += a;
    +	spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
    +	return ret != u;
    +}
    +
    +static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
    +/* Atomic operations are already serializing */
     void atomic_set(atomic_t *v, int i)
     {
	    unsigned long flags;
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


Whatever is the meaning of that "static inline ..." line, and
is this the cause of my crosstool sparc compile failure:

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
      CC      arch/sparc/lib/atomic32.o
    arch/sparc/lib/atomic32.c: In function `atomic_clear_mask':
    arch/sparc/lib/atomic32.c:72: error: parse error before '{' token
    arch/sparc/lib/atomic32.c:71: error: parm types given both in parmlist and separately
    arch/sparc/lib/atomic32.c:75: error: `flags' undeclared (first use in this function)
    arch/sparc/lib/atomic32.c:75: error: (Each undeclared identifier is reported only once
    arch/sparc/lib/atomic32.c:75: error: for each function it appears in.)
    arch/sparc/lib/atomic32.c: At top level:
    arch/sparc/lib/atomic32.c:75: error: parse error before "while"
    make[1]: *** [arch/sparc/lib/atomic32.o] Error 1
    make: *** [arch/sparc/lib] Error 2
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


-- 
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <pj@sgi.com> 1.925.600.0401

  parent reply	other threads:[~2005-11-14 16:30 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-30  0:41 [patches] lockless pagecache prep round 1 Nick Piggin
2005-10-30  0:43 ` [patch 1/5] i386 generic cmpxchg Nick Piggin
2005-10-30  0:44   ` [patch 2/5] atomic: atomic_cmpxchg Nick Piggin
2005-10-30  0:45     ` [patch 3/5] atomic: atomic_inc_not_zero Nick Piggin
2005-10-30  0:45       ` [patch 4/5] rcu file: use atomic primitives Nick Piggin
2005-10-30  0:47         ` [patch 5/5] atomic: dec_and_lock " Nick Piggin
2005-10-31 19:05       ` [patch 3/5] atomic: atomic_inc_not_zero Christoph Lameter
2005-11-01  4:34         ` Nick Piggin
2005-11-14 16:29       ` Paul Jackson [this message]
2005-11-14 21:48         ` Andrew Morton
2005-11-14 22:02           ` Paul Jackson
2005-11-14 23:09             ` Andrew Morton
2005-11-15  8:57               ` Nick Piggin
2005-10-30 20:12   ` [patch 1/5] i386 generic cmpxchg Zwane Mwaikambo
2005-10-31  1:29     ` Nick Piggin
2005-10-31  6:06       ` Zwane Mwaikambo
2005-10-31 19:09       ` Christoph Lameter
2005-10-30  0:48 ` [patche 1/5] radix tree: lookup_slot Nick Piggin
2005-10-30  0:49   ` [patch 2/5] radix tree: use prealloc Nick Piggin
2005-10-30  0:50     ` [patch 3/5] radix tree: cleanup Nick Piggin
2005-10-30  0:51       ` [patch 4/5] radix tree: clear_tags bail Nick Piggin
2005-10-30  0:57         ` [patch 5/5] radix tree: shrink Nick Piggin
2005-10-30  1:04 ` [patch 1/5] radix tree: lookup_slot Nick Piggin

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=20051114082956.609ff5cd.pj@sgi.com \
    --to=pj@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    /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