Re: Inconsistent "#ifdef __KERNEL__" on different architectures

Adrian Bunk (bunk@fs.tum.de)
Sat, 2 Jun 2001 22:29:21 +0200 (CEST)


On Wed, 30 May 2001, Ralf Baechle wrote:

> > This is no good. The ARM kernel just doesn't provide any atomic primitives
> > that will work in user space. If you want atomicity you have to use
> > libpthread.
>
> Similar on some MIPS processors where the kernel has to implement atomic
> operations because there is no practical possibility to implement them
> in userspace.

Thanks for the answer, this means:
It is specific to the arm, mips, mips64 and sparc ports that atomic_read,
atomic_inc and atomic_dec won't work in user space and they do work on all
other architectures.

(my main concern wasn't whether the "#ifdef __KERNEL__" is correct or not
but I was wondering whether there's a reason why it's different on
different architectures)

> Ralf

cu
Adrian

-- 
A "No" uttered from deepest conviction is better and greater than a
"Yes" merely uttered to please, or what is worse, to avoid trouble.
                -- Mahatma Ghandi

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