Re: [patch 3/5] atomic: atomic_inc_not_zero

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]> 1.925.600.0401
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux