Changeset 37209 in vbox for trunk/include
- Timestamp:
- May 25, 2011 9:33:12 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/asm.h
r36595 r37209 1754 1754 1755 1755 /** 1756 * Atomically reads a size_t value, ordered. 1757 * 1758 * @returns Current *pcb value 1759 * @param pcb Pointer to the size_t variable to read. 1760 */ 1761 DECLINLINE(size_t) ASMAtomicReadZ(size_t volatile *pcb) 1762 { 1763 #if ARCH_BITS == 64 1764 return ASMAtomicReadU64((uint64_t volatile *)pcb); 1765 #elif ARCH_BITS == 32 1766 return ASMAtomicReadU32((uint32_t volatile *)pcb); 1767 #else 1768 # error "Unsupported ARCH_BITS value" 1769 #endif 1770 } 1771 1772 1773 /** 1774 * Atomically reads a size_t value, unordered. 1775 * 1776 * @returns Current *pcb value 1777 * @param pcb Pointer to the size_t variable to read. 1778 */ 1779 DECLINLINE(size_t) ASMAtomicUoReadZ(size_t volatile *pcb) 1780 { 1781 #if ARCH_BITS == 64 1782 return ASMAtomicUoReadU64((uint64_t volatile *)pcb); 1783 #elif ARCH_BITS == 32 1784 return ASMAtomicUoReadU32((uint32_t volatile *)pcb); 1785 #else 1786 # error "Unsupported ARCH_BITS value" 1787 #endif 1788 } 1789 1790 1791 /** 1756 1792 * Atomically reads a pointer value, ordered. 1757 1793 *
Note:
See TracChangeset
for help on using the changeset viewer.