- Timestamp:
- Jun 22, 2009 3:31:31 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 48909
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/asm.h
r20785 r20789 3850 3850 3851 3851 3852 /** 3852 /** 3853 3853 * Serialize Instruction. 3854 3854 */ … … 5447 5447 /** 5448 5448 * Sets a bit in a bitmap. 5449 * @note Address should be 32-bit aligned for performance reasons. 5450 * 5451 * @param pvBitmap Pointer to the bitmap. 5449 * 5450 * @param pvBitmap Pointer to the bitmap. This should be 32-bit aligned. 5452 5451 * @param iBit The bit to set. 5452 * 5453 * @remarks The 32-bit aligning of pvBitmap is not a strict requirement. 5454 * However, doing so will yield better performance as well as avoiding 5455 * traps accessing the last bits in the bitmap. 5453 5456 */ 5454 5457 #if RT_INLINE_ASM_EXTERNAL && !RT_INLINE_ASM_USES_INTRIN … … 5486 5489 /** 5487 5490 * Atomically sets a bit in a bitmap, ordered. 5488 * @note Address must be 32-bit aligned, otherwise the memory access isn't atomic!5489 * 5490 * @param pvBitmap Pointer to the bitmap.5491 * 5492 * @param pvBitmap Pointer to the bitmap. Must be 32-bit aligned, otherwise 5493 * the memory access isn't atomic! 5491 5494 * @param iBit The bit to set. 5492 5495 */ … … 5525 5528 /** 5526 5529 * Clears a bit in a bitmap. 5527 * @note Address should be 32-bit aligned for performance reasons.5528 5530 * 5529 5531 * @param pvBitmap Pointer to the bitmap. 5530 5532 * @param iBit The bit to clear. 5533 * 5534 * @remarks The 32-bit aligning of pvBitmap is not a strict requirement. 5535 * However, doing so will yield better performance as well as avoiding 5536 * traps accessing the last bits in the bitmap. 5531 5537 */ 5532 5538 #if RT_INLINE_ASM_EXTERNAL && !RT_INLINE_ASM_USES_INTRIN … … 5564 5570 /** 5565 5571 * Atomically clears a bit in a bitmap, ordered. 5566 * @note Address must be 32-bit aligned, otherwise the memory access isn't atomic!5567 * 5568 * @param pvBitmap Pointer to the bitmap.5572 * 5573 * @param pvBitmap Pointer to the bitmap. Must be 32-bit aligned, otherwise 5574 * the memory access isn't atomic! 5569 5575 * @param iBit The bit to toggle set. 5570 * @remark 5576 * @remarks No memory barrier, take care on smp. 5571 5577 */ 5572 5578 #if RT_INLINE_ASM_EXTERNAL … … 5602 5608 /** 5603 5609 * Toggles a bit in a bitmap. 5604 * @note Address should be 32-bit aligned for performance reasons.5605 5610 * 5606 5611 * @param pvBitmap Pointer to the bitmap. 5607 5612 * @param iBit The bit to toggle. 5613 * 5614 * @remarks The 32-bit aligning of pvBitmap is not a strict requirement. 5615 * However, doing so will yield better performance as well as avoiding 5616 * traps accessing the last bits in the bitmap. 5608 5617 */ 5609 5618 #if RT_INLINE_ASM_EXTERNAL && !RT_INLINE_ASM_USES_INTRIN … … 5640 5649 /** 5641 5650 * Atomically toggles a bit in a bitmap, ordered. 5642 * @note Address must be 32-bit aligned, otherwise the memory access isn't atomic!5643 * 5644 * @param pvBitmap Pointer to the bitmap.5651 * 5652 * @param pvBitmap Pointer to the bitmap. Must be 32-bit aligned, otherwise 5653 * the memory access isn't atomic! 5645 5654 * @param iBit The bit to test and set. 5646 5655 */ … … 5677 5686 /** 5678 5687 * Tests and sets a bit in a bitmap. 5679 * @note Address should be 32-bit aligned for performance reasons.5680 5688 * 5681 5689 * @returns true if the bit was set. 5682 5690 * @returns false if the bit was clear. 5691 * 5683 5692 * @param pvBitmap Pointer to the bitmap. 5684 5693 * @param iBit The bit to test and set. 5694 * 5695 * @remarks The 32-bit aligning of pvBitmap is not a strict requirement. 5696 * However, doing so will yield better performance as well as avoiding 5697 * traps accessing the last bits in the bitmap. 5685 5698 */ 5686 5699 #if RT_INLINE_ASM_EXTERNAL && !RT_INLINE_ASM_USES_INTRIN … … 5725 5738 /** 5726 5739 * Atomically tests and sets a bit in a bitmap, ordered. 5727 * @note Address must be 32-bit aligned, otherwise the memory access isn't atomic!5728 5740 * 5729 5741 * @returns true if the bit was set. 5730 5742 * @returns false if the bit was clear. 5731 * @param pvBitmap Pointer to the bitmap. 5743 * 5744 * @param pvBitmap Pointer to the bitmap. Must be 32-bit aligned, otherwise 5745 * the memory access isn't atomic! 5732 5746 * @param iBit The bit to set. 5733 5747 */ … … 5773 5787 /** 5774 5788 * Tests and clears a bit in a bitmap. 5775 * @note Address should be 32-bit aligned for performance reasons.5776 5789 * 5777 5790 * @returns true if the bit was set. 5778 5791 * @returns false if the bit was clear. 5792 * 5779 5793 * @param pvBitmap Pointer to the bitmap. 5780 5794 * @param iBit The bit to test and clear. 5795 * 5796 * @remarks The 32-bit aligning of pvBitmap is not a strict requirement. 5797 * However, doing so will yield better performance as well as avoiding 5798 * traps accessing the last bits in the bitmap. 5781 5799 */ 5782 5800 #if RT_INLINE_ASM_EXTERNAL && !RT_INLINE_ASM_USES_INTRIN … … 5821 5839 /** 5822 5840 * Atomically tests and clears a bit in a bitmap, ordered. 5823 * @note Address must be 32-bit aligned, otherwise the memory access isn't atomic!5824 5841 * 5825 5842 * @returns true if the bit was set. 5826 5843 * @returns false if the bit was clear. 5827 * @param pvBitmap Pointer to the bitmap. 5844 * 5845 * @param pvBitmap Pointer to the bitmap. Must be 32-bit aligned, otherwise 5846 * the memory access isn't atomic! 5828 5847 * @param iBit The bit to test and clear. 5829 * @remark No memory barrier, take care on smp. 5848 * 5849 * @remarks No memory barrier, take care on smp. 5830 5850 */ 5831 5851 #if RT_INLINE_ASM_EXTERNAL && !RT_INLINE_ASM_USES_INTRIN … … 5871 5891 /** 5872 5892 * Tests and toggles a bit in a bitmap. 5873 * @note Address should be 32-bit aligned for performance reasons.5874 5893 * 5875 5894 * @returns true if the bit was set. 5876 5895 * @returns false if the bit was clear. 5896 * 5877 5897 * @param pvBitmap Pointer to the bitmap. 5878 5898 * @param iBit The bit to test and toggle. 5899 * 5900 * @remarks The 32-bit aligning of pvBitmap is not a strict requirement. 5901 * However, doing so will yield better performance as well as avoiding 5902 * traps accessing the last bits in the bitmap. 5879 5903 */ 5880 5904 #if RT_INLINE_ASM_EXTERNAL && !RT_INLINE_ASM_USES_INTRIN … … 5919 5943 /** 5920 5944 * Atomically tests and toggles a bit in a bitmap, ordered. 5921 * @note Address must be 32-bit aligned, otherwise the memory access isn't atomic!5922 5945 * 5923 5946 * @returns true if the bit was set. 5924 5947 * @returns false if the bit was clear. 5925 * @param pvBitmap Pointer to the bitmap. 5948 * 5949 * @param pvBitmap Pointer to the bitmap. Must be 32-bit aligned, otherwise 5950 * the memory access isn't atomic! 5926 5951 * @param iBit The bit to test and toggle. 5927 5952 */ … … 5965 5990 /** 5966 5991 * Tests if a bit in a bitmap is set. 5967 * @note Address should be 32-bit aligned for performance reasons.5968 5992 * 5969 5993 * @returns true if the bit is set. 5970 5994 * @returns false if the bit is clear. 5995 * 5971 5996 * @param pvBitmap Pointer to the bitmap. 5972 5997 * @param iBit The bit to test. 5998 * 5999 * @remarks The 32-bit aligning of pvBitmap is not a strict requirement. 6000 * However, doing so will yield better performance as well as avoiding 6001 * traps accessing the last bits in the bitmap. 5973 6002 */ 5974 6003 #if RT_INLINE_ASM_EXTERNAL && !RT_INLINE_ASM_USES_INTRIN
Note:
See TracChangeset
for help on using the changeset viewer.