diff options
| author | Jean-Luc Brouillet <jeanluc@google.com> | 2015-04-03 14:39:53 -0700 |
|---|---|---|
| committer | Jean-Luc Brouillet <jeanluc@google.com> | 2015-04-03 17:15:25 -0700 |
| commit | 20b27d602a4778ed50a83df2147416a35b7c92be (patch) | |
| tree | 35184da58f7faf245ebe159434240d73f506202d /scriptc/rs_atomic.rsh | |
| parent | bfc8ef78572e49b13b8e5335fd0ca00c90f763da (diff) | |
| download | android_frameworks_rs-20b27d602a4778ed50a83df2147416a35b7c92be.tar.gz android_frameworks_rs-20b27d602a4778ed50a83df2147416a35b7c92be.tar.bz2 android_frameworks_rs-20b27d602a4778ed50a83df2147416a35b7c92be.zip | |
Improve the documentation of the RenderScript API.
Only the explanations should be changing.
Change-Id: I889b366e3be44f5ac7f44a199e4b9a47353665e2
Diffstat (limited to 'scriptc/rs_atomic.rsh')
| -rw-r--r-- | scriptc/rs_atomic.rsh | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/scriptc/rs_atomic.rsh b/scriptc/rs_atomic.rsh index 58ce1307..cc2b8d5e 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 @@ extern int32_t __attribute__((overloadable)) * 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 @@ extern int32_t __attribute__((overloadable)) * 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 @@ extern uint32_t __attribute__((overloadable)) /* * 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 @@ extern int32_t __attribute__((overloadable)) /* * 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 @@ extern int32_t __attribute__((overloadable)) /* * 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 @@ extern int32_t __attribute__((overloadable)) /* * 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 @@ extern int32_t __attribute__((overloadable)) * 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 @@ extern int32_t __attribute__((overloadable)) /* * 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 @@ extern int32_t __attribute__((overloadable)) * 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)) |
