VirtualBox

Changeset 20789 in vbox for trunk


Ignore:
Timestamp:
Jun 22, 2009 3:31:31 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
48909
Message:

iprt/asm.h: larger notes about alignment.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/asm.h

    r20785 r20789  
    38503850
    38513851
    3852 /** 
     3852/**
    38533853 * Serialize Instruction.
    38543854 */
     
    54475447/**
    54485448 * 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.
    54525451 * @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.
    54535456 */
    54545457#if RT_INLINE_ASM_EXTERNAL && !RT_INLINE_ASM_USES_INTRIN
     
    54865489/**
    54875490 * 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!
    54915494 * @param   iBit        The bit to set.
    54925495 */
     
    55255528/**
    55265529 * Clears a bit in a bitmap.
    5527  * @note    Address should be 32-bit aligned for performance reasons.
    55285530 *
    55295531 * @param   pvBitmap    Pointer to the bitmap.
    55305532 * @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.
    55315537 */
    55325538#if RT_INLINE_ASM_EXTERNAL && !RT_INLINE_ASM_USES_INTRIN
     
    55645570/**
    55655571 * 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!
    55695575 * @param   iBit        The bit to toggle set.
    5570  * @remark  No memory barrier, take care on smp.
     5576 * @remarks No memory barrier, take care on smp.
    55715577 */
    55725578#if RT_INLINE_ASM_EXTERNAL
     
    56025608/**
    56035609 * Toggles a bit in a bitmap.
    5604  * @note    Address should be 32-bit aligned for performance reasons.
    56055610 *
    56065611 * @param   pvBitmap    Pointer to the bitmap.
    56075612 * @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.
    56085617 */
    56095618#if RT_INLINE_ASM_EXTERNAL && !RT_INLINE_ASM_USES_INTRIN
     
    56405649/**
    56415650 * 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!
    56455654 * @param   iBit        The bit to test and set.
    56465655 */
     
    56775686/**
    56785687 * Tests and sets a bit in a bitmap.
    5679  * @note    Address should be 32-bit aligned for performance reasons.
    56805688 *
    56815689 * @returns true if the bit was set.
    56825690 * @returns false if the bit was clear.
     5691 *
    56835692 * @param   pvBitmap    Pointer to the bitmap.
    56845693 * @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.
    56855698 */
    56865699#if RT_INLINE_ASM_EXTERNAL && !RT_INLINE_ASM_USES_INTRIN
     
    57255738/**
    57265739 * 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!
    57285740 *
    57295741 * @returns true if the bit was set.
    57305742 * @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!
    57325746 * @param   iBit        The bit to set.
    57335747 */
     
    57735787/**
    57745788 * Tests and clears a bit in a bitmap.
    5775  * @note    Address should be 32-bit aligned for performance reasons.
    57765789 *
    57775790 * @returns true if the bit was set.
    57785791 * @returns false if the bit was clear.
     5792 *
    57795793 * @param   pvBitmap    Pointer to the bitmap.
    57805794 * @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.
    57815799 */
    57825800#if RT_INLINE_ASM_EXTERNAL && !RT_INLINE_ASM_USES_INTRIN
     
    58215839/**
    58225840 * 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!
    58245841 *
    58255842 * @returns true if the bit was set.
    58265843 * @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!
    58285847 * @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.
    58305850 */
    58315851#if RT_INLINE_ASM_EXTERNAL && !RT_INLINE_ASM_USES_INTRIN
     
    58715891/**
    58725892 * Tests and toggles a bit in a bitmap.
    5873  * @note    Address should be 32-bit aligned for performance reasons.
    58745893 *
    58755894 * @returns true if the bit was set.
    58765895 * @returns false if the bit was clear.
     5896 *
    58775897 * @param   pvBitmap    Pointer to the bitmap.
    58785898 * @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.
    58795903 */
    58805904#if RT_INLINE_ASM_EXTERNAL && !RT_INLINE_ASM_USES_INTRIN
     
    59195943/**
    59205944 * 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!
    59225945 *
    59235946 * @returns true if the bit was set.
    59245947 * @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!
    59265951 * @param   iBit        The bit to test and toggle.
    59275952 */
     
    59655990/**
    59665991 * Tests if a bit in a bitmap is set.
    5967  * @note    Address should be 32-bit aligned for performance reasons.
    59685992 *
    59695993 * @returns true if the bit is set.
    59705994 * @returns false if the bit is clear.
     5995 *
    59715996 * @param   pvBitmap    Pointer to the bitmap.
    59725997 * @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.
    59736002 */
    59746003#if RT_INLINE_ASM_EXTERNAL && !RT_INLINE_ASM_USES_INTRIN
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette