3 Jan 2009 13:44
atomics: document that linux expects certain atomic behaviour from unsigned long
Pavel Machek <pavel <at> suse.cz>
2009-01-03 12:44:00 GMT
2009-01-03 12:44:00 GMT
Linux relies on unsigned long to behave like atomic for read/write. diff --git a/Documentation/atomic_ops.txt b/Documentation/atomic_ops.txt index 4ef2450..0a7d180 100644 --- a/Documentation/atomic_ops.txt +++ b/Documentation/atomic_ops.txt <at> <at> -21,6 +21,9 <at> <at> local_t is very similar to atomic_t. If the counter is per CPU and only updated by one CPU, local_t is probably more appropriate. Please see Documentation/local_ops.txt for the semantics of local_t. +unsigned long can be used instead of atomic_t, if all you +need is atomic setting and atomic reading. + The first operations to implement for atomic_t's are the initializers and plain reads. -- -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majordomo <at> vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RSS Feed