atomic_add_long and others missing

Bernd Walter ticso at cicely12.cicely.de
Wed Dec 13 13:53:56 PST 2006


On Wed, Dec 13, 2006 at 09:29:38PM +0100, Olivier Houchard wrote:
> On Wed, Dec 13, 2006 at 08:25:00PM +0100, Bernd Walter wrote:
> > Netgraph expects further atomic functions:
> > ../../../netgraph/ng_base.c: In function `ng_dequeue':
> > ../../../netgraph/ng_base.c:1944: warning: implicit declaration of function `atomic_add_long'
> > ../../../netgraph/ng_base.c:1944: warning: nested extern declaration of `atomic_add_long'
> > ../../../netgraph/ng_base.c:1951: warning: nested extern declaration of `atomic_add_long'
> > ../../../netgraph/ng_base.c:1944: warning: redundant redeclaration of 'atomic_add_long'
> > ../../../netgraph/ng_base.c:1944: warning: previous implicit declaration of 'atomic_add_long' was here
> > ../../../netgraph/ng_base.c: In function `ng_queue_rw':
> > ../../../netgraph/ng_base.c:1991: warning: nested extern declaration of `atomic_add_long'
> > ../../../netgraph/ng_base.c:1944: warning: redundant redeclaration of 'atomic_add_long'
> > ../../../netgraph/ng_base.c:1944: warning: previous implicit declaration of 'atomic_add_long' was here
> > ../../../netgraph/ng_base.c: In function `ng_acquire_read':
> > ../../../netgraph/ng_base.c:2031: warning: nested extern declaration of `atomic_add_long'
> > ../../../netgraph/ng_base.c:1944: warning: redundant redeclaration of 'atomic_add_long'
> > ../../../netgraph/ng_base.c:1944: warning: previous implicit declaration of 'atomic_add_long' was here
> > ../../../netgraph/ng_base.c:2039: warning: implicit declaration of function `atomic_subtract_long'
> > ../../../netgraph/ng_base.c:2039: warning: nested extern declaration of `atomic_subtract_long'
> > ../../../netgraph/ng_base.c: In function `ng_acquire_write':
> > ../../../netgraph/ng_base.c:2083: warning: nested extern declaration of `atomic_add_long'
> > ../../../netgraph/ng_base.c:1944: warning: redundant redeclaration of 'atomic_add_long'
> > ../../../netgraph/ng_base.c:1944: warning: previous implicit declaration of 'atomic_add_long' was here
> > ../../../netgraph/ng_base.c:2087: warning: nested extern declaration of `atomic_subtract_long'
> > ../../../netgraph/ng_base.c:2039: warning: redundant redeclaration of 'atomic_subtract_long'
> > ../../../netgraph/ng_base.c:2039: warning: previous implicit declaration of 'atomic_subtract_long' was here
> > ../../../netgraph/ng_base.c: In function `ng_leave_read':
> > ../../../netgraph/ng_base.c:2107: warning: nested extern declaration of `atomic_subtract_long'
> > ../../../netgraph/ng_base.c:2039: warning: redundant redeclaration of 'atomic_subtract_long'
> > ../../../netgraph/ng_base.c:2039: warning: previous implicit declaration of 'atomic_subtract_long' was here
> > ../../../netgraph/ng_base.c: In function `ng_leave_write':
> > ../../../netgraph/ng_base.c:2113: warning: nested extern declaration of `atomic_subtract_long'
> > ../../../netgraph/ng_base.c:2039: warning: redundant redeclaration of 'atomic_subtract_long'
> > ../../../netgraph/ng_base.c:2039: warning: previous implicit declaration of 'atomic_subtract_long' was here
> > ../../../netgraph/ng_base.c: In function `ng_flush_input_queue':
> > ../../../netgraph/ng_base.c:2127: warning: nested extern declaration of `atomic_add_long'
> > ../../../netgraph/ng_base.c:1944: warning: redundant redeclaration of 'atomic_add_long'
> > ../../../netgraph/ng_base.c:1944: warning: previous implicit declaration of 'atomic_add_long' was here
> > *** Error code 1
> > 
> > I've #define'ed them localy to _32, but I suspect that there are
> > more missing.
> > 
> 
> Yes a bunch of those are missing.
> I remember des@ posting a patch to complete atomic.h, but I've never heard back
> from him.

Ok - I've found his definition and clean it up in respect of casts,
but while doing I noticed something else possibly missing.
I'm not that familar with ARM yet, but doesn't ARM need memory barriers
for acq and rel?
Currently they are all mapped to the standard functions without
barriers.

-- 
B.Walter                http://www.bwct.de      http://www.fizon.de
bernd at bwct.de           info at bwct.de            support at fizon.de


More information about the freebsd-arm mailing list