What about using atomic operations for that? This is more general
and works on ALL architectures. CMPXCHG is just and special
atomic operation on ia32.
> Where can I find some doc and some sample code?
Documentation/DocBook/kernel-hacking.tmpl
But better do
make htmldocs
in the kernel top level directory and read
Documentation/DocBook/kernel-hacking/lk-hacking-guide.html
instead.
Sample code is scattered all around in the kernel.
Regards
Ingo Oeser
-- To the systems programmer, users and applications serve only to provide a test load. - 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/