atomic operations in user space

Xupei Liang tliang at yahoo.com
Wed Aug 23 06:50:24 EST 2006


Hi,

On the PPC platform, can I use the atomic operations
defined in the kernel, e.g. atomic_add(),
atomic_dec(), etc. in the user space programs? 

I compiled the following program:

#include <asm-ppc/atomic.h>

int main()
{
	atomic_t atom;

	atomic_add(1, &atom);
	return (0);
}

I am able to compile it and the atomic_add seems to be
translated into the correct instructions. Can anybody
please confirm? Thanks.

Regards,

Terry Liang

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Linuxppc-embedded mailing list