Re: [OT] Question on atomic_inc/dec

From: Petr Vandrovec
Date: Wed Oct 15 2003 - 13:03:18 EST


On Wed, Oct 15, 2003 at 10:38:14AM -0700, Perez-Gonzalez, Inaky wrote:
> > From: sankar [mailto:san_madhav@xxxxxxxxxxx]
>
> > any solution to the original problem???
> > (atomic_inc() defintion not there in redhat 9.0 asm/atomic.h)
>
> Create an atomic.h header file in your source tree with the code
> below, but bear in mind that porting to other arches might be painful:

It is OT, but if you are interested, take a look at include/private/*atomic*,
include/private/*/*atomic* and relevant portions (ncphost) of configure.ac
in the ncpfs package (http://platan.vc.cvut.cz/ftp/pub/linux/ncpfs/ncpfs-2.2.3.tar.gz).

It contains UP, pthread based, and several asm optimized versions of
atomic ops. I'm not 100% sure that all asm versions work correctly,
but I have received no complaints yet...
Best regards,
Petr Vandrovec
vandrove@xxxxxxxxxx

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/