VirtualBox

Changeset 52582 in vbox


Ignore:
Timestamp:
Sep 3, 2014 12:50:46 PM (10 years ago)
Author:
vboxsync
Message:

iprt/cpuset.h: missed committing file changes for r95853.

File:
1 edited

Legend:

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

    r36262 r52582  
    7171
    7272/**
     73 * ANDs the given CPU set with another.
     74 *
     75 * @returns pSet.
     76 * @param   pSet          Pointer to the set.
     77 * @param   pAndMaskSet   Pointer to the AND-mask set.
     78 */
     79DECLINLINE(PRTCPUSET) RTCpuSetAnd(PRTCPUSET pSet, PRTCPUSET pAndMaskSet)
     80{
     81    unsigned i;
     82    for (i = 0; i < RT_ELEMENTS(pSet->bmSet); i++)
     83        ASMAtomicAndU64((volatile uint64_t *)&pSet->bmSet[i], pAndMaskSet->bmSet[i]);
     84    return pSet;
     85}
     86
     87
     88/**
    7389 * Adds a CPU given by its identifier to the set.
    7490 *
     
    185201    for (i = 0; i < RT_ELEMENTS(pSet1->bmSet); i++)
    186202        if (pSet1->bmSet[i] != pSet2->bmSet[i])
     203            return false;
     204    return true;
     205}
     206
     207
     208/**
     209 * Checks if the CPU set is empty or not.
     210 *
     211 * @returns true / false accordingly.
     212 * @param   pSet    Pointer to the set.
     213 */
     214DECLINLINE(bool) RTCpuSetIsEmpty(PRTCPUSET pSet)
     215{
     216    unsigned i;
     217    for (i = 0; i < RT_ELEMENTS(pSet->bmSet); i++)
     218        if (pSet->bmSet[i])
    187219            return false;
    188220    return true;
Note: See TracChangeset for help on using the changeset viewer.

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