* new platform. If no such generic implementation is available spinlocks (or
* even OS provided semaphores) will be used to implement the API.
*
- * Implement the _u64 variantes if and only if your platform can use them
+ * Implement the _u64 variants if and only if your platform can use them
* efficiently (and obviously correctly).
*
* Use higher level functionality (lwlocks, spinlocks, heavyweight locks)
*
* These files can provide the full set of atomics or can do pretty much
* nothing if all the compilers commonly used on these platforms provide
- * useable generics.
+ * usable generics.
*
* Don't add an inline assembly of the actual atomic operations if all the
* common implementations of your platform provide intrinsics. Intrinsics are
}
/*
- * pg_atomic_write_u32 - unlocked write to atomic variable.
+ * pg_atomic_read_u32 - unlocked read from atomic variable.
*
- * The write is guaranteed to succeed as a whole, i.e. it's not possible to
- * observe a partial write for any reader.
+ * The read is guaranteed to return a value as it has been written by this or
+ * another process at some point in the past. There's however no cache
+ * coherency interaction guaranteeing the value hasn't since been written to
+ * again.
*
* No barrier semantics.
*/
}
/*
- * pg_atomic_read_u32 - unlocked read from atomic variable.
+ * pg_atomic_write_u32 - unlocked write to atomic variable.
*
- * The read is guaranteed to return a value as it has been written by this or
- * another process at some point in the past. There's however no cache
- * coherency interaction guaranteeing the value hasn't since been written to
- * again.
+ * The write is guaranteed to succeed as a whole, i.e. it's not possible to
+ * observe a partial write for any reader.
*
* No barrier semantics.
*/