Improve the documentation of the RenderScript API.
Only the explanations should be changing.
Change-Id: I889b366e3be44f5ac7f44a199e4b9a47353665e2
diff --git a/scriptc/rs_atomic.rsh b/scriptc/rs_atomic.rsh
index 58ce130..cc2b8d5 100644
--- a/scriptc/rs_atomic.rsh
+++ b/scriptc/rs_atomic.rsh
@@ -17,13 +17,13 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh.
/*
- * rs_atomic.rsh: Atomic routines
+ * rs_atomic.rsh: Atomic Update Functions
*
* To update values shared between multiple threads, use the functions below.
* They ensure that the values are atomically updated, i.e. that the memory
- * reads, the updates, and the memory writes are all done in the right order.
+ * reads, the updates, and the memory writes are done in the right order.
*
- * These functions are slower than just doing the non-atomic variants, so use
+ * These functions are slower than their non-atomic equivalents, so use
* them only when synchronization is needed.
*
* Note that in RenderScript, your code is likely to be running in separate
@@ -42,10 +42,10 @@
* Atomicly adds a value to the value at addr, i.e. *addr += value.
*
* Parameters:
- * addr: Address of the value to modify
- * value: Amount to add
+ * addr: Address of the value to modify.
+ * value: Amount to add.
*
- * Returns: Old value
+ * Returns: Value of *addr prior to the operation.
*/
#if (defined(RS_VERSION) && (RS_VERSION >= 14))
extern int32_t __attribute__((overloadable))
@@ -61,13 +61,13 @@
* rsAtomicAnd: Thread-safe bitwise and
*
* Atomicly performs a bitwise and of two values, storing the result back at addr,
- * i.e. *addr &= value
+ * i.e. *addr &= value.
*
* Parameters:
- * addr: Address of the value to modify
- * value: Value to and with
+ * addr: Address of the value to modify.
+ * value: Value to and with.
*
- * Returns: Old value
+ * Returns: Value of *addr prior to the operation.
*/
#if (defined(RS_VERSION) && (RS_VERSION >= 14))
extern int32_t __attribute__((overloadable))
@@ -83,17 +83,17 @@
* rsAtomicCas: Thread-safe compare and set
*
* If the value at addr matches compareValue then the newValue is written at addr,
- * i.e. if (*addr == compareValue) { *addr = newValue; }
+ * i.e. if (*addr == compareValue) { *addr = newValue; }.
*
* You can check that the value was written by checking that the value returned
- * by rsAtomicCas is compareValue.
+ * by rsAtomicCas() is compareValue.
*
* Parameters:
- * addr: The address to compare and replace if the compare passes.
+ * addr: The address of the value to compare and replace if the test passes.
* compareValue: The value to test *addr against.
* newValue: The value to write if the test passes.
*
- * Returns: Old value
+ * Returns: Value of *addr prior to the operation.
*/
#if (defined(RS_VERSION) && (RS_VERSION >= 14))
extern int32_t __attribute__((overloadable))
@@ -108,12 +108,12 @@
/*
* rsAtomicDec: Thread-safe decrement
*
- * Atomicly subtracts one from the value at addr. Equal to rsAtomicSub(addr, 1)
+ * Atomicly subtracts one from the value at addr. This is equivalent to rsAtomicSub(addr, 1).
*
* Parameters:
- * addr: Address of the value to decrement
+ * addr: Address of the value to decrement.
*
- * Returns: Old value
+ * Returns: Value of *addr prior to the operation.
*/
#if (defined(RS_VERSION) && (RS_VERSION >= 14))
extern int32_t __attribute__((overloadable))
@@ -128,12 +128,12 @@
/*
* rsAtomicInc: Thread-safe increment
*
- * Atomicly adds one to the value at addr. Equal to rsAtomicAdd(addr, 1)
+ * Atomicly adds one to the value at addr. This is equivalent to rsAtomicAdd(addr, 1).
*
* Parameters:
- * addr: Address of the value to increment
+ * addr: Address of the value to increment.
*
- * Returns: Old value
+ * Returns: Value of *addr prior to the operation.
*/
#if (defined(RS_VERSION) && (RS_VERSION >= 14))
extern int32_t __attribute__((overloadable))
@@ -148,14 +148,14 @@
/*
* rsAtomicMax: Thread-safe maximum
*
- * Atomicly sets the value at addr to the maximum of addr and value, i.e.
- * *addr = max(*addr, value)
+ * Atomicly sets the value at addr to the maximum of *addr and value, i.e.
+ * *addr = max(*addr, value).
*
* Parameters:
- * addr: Address of the value to modify
- * value: Comparison value
+ * addr: Address of the value to modify.
+ * value: Comparison value.
*
- * Returns: Old value
+ * Returns: Value of *addr prior to the operation.
*/
#if (defined(RS_VERSION) && (RS_VERSION >= 14))
extern uint32_t __attribute__((overloadable))
@@ -170,14 +170,14 @@
/*
* rsAtomicMin: Thread-safe minimum
*
- * Atomicly sets the value at addr to the minimum of addr and value, i.e.
- * *addr = min(*addr, value)
+ * Atomicly sets the value at addr to the minimum of *addr and value, i.e.
+ * *addr = min(*addr, value).
*
* Parameters:
- * addr: Address of the value to modify
- * value: Comparison value
+ * addr: Address of the value to modify.
+ * value: Comparison value.
*
- * Returns: Old value
+ * Returns: Value of *addr prior to the operation.
*/
#if (defined(RS_VERSION) && (RS_VERSION >= 14))
extern uint32_t __attribute__((overloadable))
@@ -193,13 +193,13 @@
* rsAtomicOr: Thread-safe bitwise or
*
* Atomicly perform a bitwise or two values, storing the result at addr,
- * i.e. *addr |= value
+ * i.e. *addr |= value.
*
* Parameters:
- * addr: Address of the value to modify
- * value: Value to or with
+ * addr: Address of the value to modify.
+ * value: Value to or with.
*
- * Returns: Old value
+ * Returns: Value of *addr prior to the operation.
*/
#if (defined(RS_VERSION) && (RS_VERSION >= 14))
extern int32_t __attribute__((overloadable))
@@ -214,13 +214,13 @@
/*
* rsAtomicSub: Thread-safe subtraction
*
- * Atomicly subtracts a value from the value at addr, i.e. *addr -= value
+ * Atomicly subtracts a value from the value at addr, i.e. *addr -= value.
*
* Parameters:
- * addr: Address of the value to modify
- * value: Amount to subtract
+ * addr: Address of the value to modify.
+ * value: Amount to subtract.
*
- * Returns: Old value
+ * Returns: Value of *addr prior to the operation.
*/
#if (defined(RS_VERSION) && (RS_VERSION >= 14))
extern int32_t __attribute__((overloadable))
@@ -236,13 +236,13 @@
* rsAtomicXor: Thread-safe bitwise exclusive or
*
* Atomicly performs a bitwise xor of two values, storing the result at addr,
- * i.e. *addr ^= value
+ * i.e. *addr ^= value.
*
* Parameters:
- * addr: Address of the value to modify
- * value: Value to xor with
+ * addr: Address of the value to modify.
+ * value: Value to xor with.
*
- * Returns: Old value
+ * Returns: Value of *addr prior to the operation.
*/
#if (defined(RS_VERSION) && (RS_VERSION >= 14))
extern int32_t __attribute__((overloadable))