Linux Standard Base Specification for the Itanium™ Architecture 1.3 | ||
---|---|---|
Prev | Appendix C. Build Environment | Next |
The synchronization primitives listed below should be available to applications in the LSB Build Environment for Itanium™. These intrinsic functions need not be provided in any system library, and the compiler may treat these as inline functions in all cases. See Intel® Itanium ™ Processor-specific Application Binary Interface, Chapter 7.4 for details.
Table C-2. Intrinsic Functions
Symbol | Description |
---|---|
__sync_fetch_and_add | Atomically add a value to a referenced location and return the previous value |
__sync_fetch_and_sub | Atomically subtract a value from a referenced location and return the previous value |
__sync_fetch_and_or | Atomically bitwise or a value with a referenced location and return the previous value |
__sync_fetch_and_and | Atomically bitwise and a value with a referenced location and return the previous value |
__sync_fetch_and_xor | Atomically bitwise exclusive or a value with a referenced location and return the previous value |
__sync_fetch_and_nand | Atomically bitwise not-and a value with a referenced location and return the previous value |
__sync_add_and_fetch | Atomically add a value to a referenced location and return the new value |
__sync_sub_and_fetch | Atomically subtract a value from a referenced location and return the new value |
__sync_or_and_fetch | Atomically bitwise or a value with a referenced location and return the new value |
__sync_and_and_fetch | Atomically bitwise and a value with a referenced location and return the new value |
__sync_xor_and_fetch | Atomically bitwise exclusive or a value with a referenced location and return the new value |
__sync_nand_and_fetch | Atomically bitwise not-and a value with a referenced location and return the new value |
__sync_bool_compare_and_swap | Atomically compare a referenced location with a given value. If equal, replace the contents of the location with a new value, and return 1 (true), otherwise return 0 (false). |
__sync_val_compare_and_swap | Atomically compare a referenced location with a given value. If equal, replace the contents of the location with a new value. Return the resulting value. |
__sync_synchronize | A synchronization point. |
__sync_lock_test_and_set | Atomically set a referenced location to a value and return the old value. Acquire a lock on the referenced location. |
__sync_lock_release | Release a lock acquired previously. |