diff options
Diffstat (limited to 'share/doc/gcc-linaro-aarch64-linux-gnu/html/gcc/_005f_005fsync-Builtins.html')
-rw-r--r-- | share/doc/gcc-linaro-aarch64-linux-gnu/html/gcc/_005f_005fsync-Builtins.html | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/share/doc/gcc-linaro-aarch64-linux-gnu/html/gcc/_005f_005fsync-Builtins.html b/share/doc/gcc-linaro-aarch64-linux-gnu/html/gcc/_005f_005fsync-Builtins.html index dea494a..71a0fde 100644 --- a/share/doc/gcc-linaro-aarch64-linux-gnu/html/gcc/_005f_005fsync-Builtins.html +++ b/share/doc/gcc-linaro-aarch64-linux-gnu/html/gcc/_005f_005fsync-Builtins.html @@ -93,7 +93,7 @@ we make some use of this list, an empty list will continue to mean all globally accessible variables. <dl> -<dt><var>type</var><code> __sync_fetch_and_add (</code><var>type</var><code> *ptr, </code><var>type</var><code> value, ...)</code><dt><var>type</var><code> __sync_fetch_and_sub (</code><var>type</var><code> *ptr, </code><var>type</var><code> value, ...)</code><dt><var>type</var><code> __sync_fetch_and_or (</code><var>type</var><code> *ptr, </code><var>type</var><code> value, ...)</code><dt><var>type</var><code> __sync_fetch_and_and (</code><var>type</var><code> *ptr, </code><var>type</var><code> value, ...)</code><dt><var>type</var><code> __sync_fetch_and_xor (</code><var>type</var><code> *ptr, </code><var>type</var><code> value, ...)</code><dt><var>type</var><code> __sync_fetch_and_nand (</code><var>type</var><code> *ptr, </code><var>type</var><code> value, ...)</code><dd><a name="index-g_t_005f_005fsync_005ffetch_005fand_005fadd-2813"></a><a name="index-g_t_005f_005fsync_005ffetch_005fand_005fsub-2814"></a><a name="index-g_t_005f_005fsync_005ffetch_005fand_005for-2815"></a><a name="index-g_t_005f_005fsync_005ffetch_005fand_005fand-2816"></a><a name="index-g_t_005f_005fsync_005ffetch_005fand_005fxor-2817"></a><a name="index-g_t_005f_005fsync_005ffetch_005fand_005fnand-2818"></a>These builtins perform the operation suggested by the name, and +<dt><var>type</var><code> __sync_fetch_and_add (</code><var>type</var><code> *ptr, </code><var>type</var><code> value, ...)</code><dt><var>type</var><code> __sync_fetch_and_sub (</code><var>type</var><code> *ptr, </code><var>type</var><code> value, ...)</code><dt><var>type</var><code> __sync_fetch_and_or (</code><var>type</var><code> *ptr, </code><var>type</var><code> value, ...)</code><dt><var>type</var><code> __sync_fetch_and_and (</code><var>type</var><code> *ptr, </code><var>type</var><code> value, ...)</code><dt><var>type</var><code> __sync_fetch_and_xor (</code><var>type</var><code> *ptr, </code><var>type</var><code> value, ...)</code><dt><var>type</var><code> __sync_fetch_and_nand (</code><var>type</var><code> *ptr, </code><var>type</var><code> value, ...)</code><dd><a name="index-g_t_005f_005fsync_005ffetch_005fand_005fadd-2815"></a><a name="index-g_t_005f_005fsync_005ffetch_005fand_005fsub-2816"></a><a name="index-g_t_005f_005fsync_005ffetch_005fand_005for-2817"></a><a name="index-g_t_005f_005fsync_005ffetch_005fand_005fand-2818"></a><a name="index-g_t_005f_005fsync_005ffetch_005fand_005fxor-2819"></a><a name="index-g_t_005f_005fsync_005ffetch_005fand_005fnand-2820"></a>These builtins perform the operation suggested by the name, and returns the value that had previously been in memory. That is, <pre class="smallexample"> { tmp = *ptr; *ptr <var>op</var>= value; return tmp; } @@ -102,7 +102,7 @@ returns the value that had previously been in memory. That is, <p><em>Note:</em> GCC 4.4 and later implement <code>__sync_fetch_and_nand</code> builtin as <code>*ptr = ~(tmp & value)</code> instead of <code>*ptr = ~tmp & value</code>. - <br><dt><var>type</var><code> __sync_add_and_fetch (</code><var>type</var><code> *ptr, </code><var>type</var><code> value, ...)</code><dt><var>type</var><code> __sync_sub_and_fetch (</code><var>type</var><code> *ptr, </code><var>type</var><code> value, ...)</code><dt><var>type</var><code> __sync_or_and_fetch (</code><var>type</var><code> *ptr, </code><var>type</var><code> value, ...)</code><dt><var>type</var><code> __sync_and_and_fetch (</code><var>type</var><code> *ptr, </code><var>type</var><code> value, ...)</code><dt><var>type</var><code> __sync_xor_and_fetch (</code><var>type</var><code> *ptr, </code><var>type</var><code> value, ...)</code><dt><var>type</var><code> __sync_nand_and_fetch (</code><var>type</var><code> *ptr, </code><var>type</var><code> value, ...)</code><dd><a name="index-g_t_005f_005fsync_005fadd_005fand_005ffetch-2819"></a><a name="index-g_t_005f_005fsync_005fsub_005fand_005ffetch-2820"></a><a name="index-g_t_005f_005fsync_005for_005fand_005ffetch-2821"></a><a name="index-g_t_005f_005fsync_005fand_005fand_005ffetch-2822"></a><a name="index-g_t_005f_005fsync_005fxor_005fand_005ffetch-2823"></a><a name="index-g_t_005f_005fsync_005fnand_005fand_005ffetch-2824"></a>These builtins perform the operation suggested by the name, and + <br><dt><var>type</var><code> __sync_add_and_fetch (</code><var>type</var><code> *ptr, </code><var>type</var><code> value, ...)</code><dt><var>type</var><code> __sync_sub_and_fetch (</code><var>type</var><code> *ptr, </code><var>type</var><code> value, ...)</code><dt><var>type</var><code> __sync_or_and_fetch (</code><var>type</var><code> *ptr, </code><var>type</var><code> value, ...)</code><dt><var>type</var><code> __sync_and_and_fetch (</code><var>type</var><code> *ptr, </code><var>type</var><code> value, ...)</code><dt><var>type</var><code> __sync_xor_and_fetch (</code><var>type</var><code> *ptr, </code><var>type</var><code> value, ...)</code><dt><var>type</var><code> __sync_nand_and_fetch (</code><var>type</var><code> *ptr, </code><var>type</var><code> value, ...)</code><dd><a name="index-g_t_005f_005fsync_005fadd_005fand_005ffetch-2821"></a><a name="index-g_t_005f_005fsync_005fsub_005fand_005ffetch-2822"></a><a name="index-g_t_005f_005fsync_005for_005fand_005ffetch-2823"></a><a name="index-g_t_005f_005fsync_005fand_005fand_005ffetch-2824"></a><a name="index-g_t_005f_005fsync_005fxor_005fand_005ffetch-2825"></a><a name="index-g_t_005f_005fsync_005fnand_005fand_005ffetch-2826"></a>These builtins perform the operation suggested by the name, and return the new value. That is, <pre class="smallexample"> { *ptr <var>op</var>= value; return *ptr; } @@ -112,7 +112,7 @@ return the new value. That is, builtin as <code>*ptr = ~(*ptr & value)</code> instead of <code>*ptr = ~*ptr & value</code>. - <br><dt><code>bool __sync_bool_compare_and_swap (</code><var>type</var><code> *ptr, </code><var>type</var><code> oldval, </code><var>type</var><code> newval, ...)</code><dt><var>type</var><code> __sync_val_compare_and_swap (</code><var>type</var><code> *ptr, </code><var>type</var><code> oldval, </code><var>type</var><code> newval, ...)</code><dd><a name="index-g_t_005f_005fsync_005fbool_005fcompare_005fand_005fswap-2825"></a><a name="index-g_t_005f_005fsync_005fval_005fcompare_005fand_005fswap-2826"></a>These builtins perform an atomic compare and swap. That is, if the current + <br><dt><code>bool __sync_bool_compare_and_swap (</code><var>type</var><code> *ptr, </code><var>type</var><code> oldval, </code><var>type</var><code> newval, ...)</code><dt><var>type</var><code> __sync_val_compare_and_swap (</code><var>type</var><code> *ptr, </code><var>type</var><code> oldval, </code><var>type</var><code> newval, ...)</code><dd><a name="index-g_t_005f_005fsync_005fbool_005fcompare_005fand_005fswap-2827"></a><a name="index-g_t_005f_005fsync_005fval_005fcompare_005fand_005fswap-2828"></a>These builtins perform an atomic compare and swap. That is, if the current value of <code>*</code><var>ptr</var> is <var>oldval</var>, then write <var>newval</var> into <code>*</code><var>ptr</var>. @@ -120,9 +120,9 @@ value of <code>*</code><var>ptr</var> is <var>oldval</var>, then write <var>newv <var>newval</var> was written. The “val” version returns the contents of <code>*</code><var>ptr</var> before the operation. - <br><dt><code>__sync_synchronize (...)</code><dd><a name="index-g_t_005f_005fsync_005fsynchronize-2827"></a>This builtin issues a full memory barrier. + <br><dt><code>__sync_synchronize (...)</code><dd><a name="index-g_t_005f_005fsync_005fsynchronize-2829"></a>This builtin issues a full memory barrier. - <br><dt><var>type</var><code> __sync_lock_test_and_set (</code><var>type</var><code> *ptr, </code><var>type</var><code> value, ...)</code><dd><a name="index-g_t_005f_005fsync_005flock_005ftest_005fand_005fset-2828"></a>This builtin, as described by Intel, is not a traditional test-and-set + <br><dt><var>type</var><code> __sync_lock_test_and_set (</code><var>type</var><code> *ptr, </code><var>type</var><code> value, ...)</code><dd><a name="index-g_t_005f_005fsync_005flock_005ftest_005fand_005fset-2830"></a>This builtin, as described by Intel, is not a traditional test-and-set operation, but rather an atomic exchange operation. It writes <var>value</var> into <code>*</code><var>ptr</var>, and returns the previous contents of <code>*</code><var>ptr</var>. @@ -139,7 +139,7 @@ speculated to) before the builtin, but previous memory stores may not be globally visible yet, and previous memory loads may not yet be satisfied. - <br><dt><code>void __sync_lock_release (</code><var>type</var><code> *ptr, ...)</code><dd><a name="index-g_t_005f_005fsync_005flock_005frelease-2829"></a>This builtin releases the lock acquired by <code>__sync_lock_test_and_set</code>. + <br><dt><code>void __sync_lock_release (</code><var>type</var><code> *ptr, ...)</code><dd><a name="index-g_t_005f_005fsync_005flock_005frelease-2831"></a>This builtin releases the lock acquired by <code>__sync_lock_test_and_set</code>. Normally this means writing the constant 0 to <code>*</code><var>ptr</var>. <p>This builtin is not a full barrier, but rather a <dfn>release barrier</dfn>. |