Changeset 58955 in vbox for trunk/include
- Timestamp:
- Dec 2, 2015 3:59:59 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 104467
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/cdefs.h
r58953 r58955 1513 1513 * - \<a_FieldNm\>_MASK: The field mask. 1514 1514 * 1515 * @returns The bit field value. 1515 1516 * @param a_uValue The integer value containing the field. 1516 1517 * @param a_FieldNm The field name prefix for getting at the _SHIFT and 1517 1518 * _MASK macros. 1518 * @sa #RT_BF_ MAKE, #RT_BF_ZMASK1519 * @sa #RT_BF_CLEAR, #RT_BF_SET, #RT_BF_MAKE, #RT_BF_ZMASK 1519 1520 */ 1520 1521 #define RT_BF_GET(a_uValue, a_FieldNm) ( ((a_uValue) >> RT_CONCAT(a_FieldNm,_SHIFT)) & RT_BF_ZMASK(a_FieldNm) ) 1522 1523 /** @def RT_BF_SET 1524 * Sets the given bit field in the integer value. 1525 * 1526 * This requires a couple of macros to be defined for the field: 1527 * - \<a_FieldNm\>_SHIFT: The shift count to get to the field. 1528 * - \<a_FieldNm\>_MASK: The field mask. Must have the same type as the 1529 * integer value!! 1530 * 1531 * @returns Integer value with bit field set to @a a_uFieldValue. 1532 * @param a_uValue The integer value containing the field. 1533 * @param a_FieldNm The field name prefix for getting at the _SHIFT and 1534 * _MASK macros. 1535 * @param a_uFieldValue The new field value. 1536 * @sa #RT_BF_GET, #RT_BF_CLEAR, #RT_BF_MAKE, #RT_BF_ZMASK 1537 */ 1538 #define RT_BF_SET(a_uValue, a_FieldNm, a_uFieldValue) ( RT_BF_CLEAR(a_uValue, a_FieldNm) | RT_BF_MAKE(a_FieldNm, a_uFieldValue) ) 1539 1540 /** @def RT_BF_CLEAR 1541 * Clears the given bit field in the integer value. 1542 * 1543 * This requires a couple of macros to be defined for the field: 1544 * - \<a_FieldNm\>_SHIFT: The shift count to get to the field. 1545 * - \<a_FieldNm\>_MASK: The field mask. Must have the same type as the 1546 * integer value!! 1547 * 1548 * @returns Integer value with bit field set to zero. 1549 * @param a_uValue The integer value containing the field. 1550 * @param a_FieldNm The field name prefix for getting at the _SHIFT and 1551 * _MASK macros. 1552 * @sa #RT_BF_GET, #RT_BF_SET, #RT_BF_MAKE, #RT_BF_ZMASK 1553 */ 1554 #define RT_BF_CLEAR(a_uValue, a_FieldNm) ( (a_uValue) & ~RT_CONCAT(a_FieldNm,_MASK) ) 1521 1555 1522 1556 /** @def RT_BF_MAKE … … 1531 1565 * @param a_uFieldValue The field value that should be masked and shifted 1532 1566 * into position. 1533 * @sa #RT_BF_GET, #RT_BF_ ZMASK1567 * @sa #RT_BF_GET, #RT_BF_SET, #RT_BF_CLEAR, #RT_BF_ZMASK 1534 1568 */ 1535 1569 #define RT_BF_MAKE(a_FieldNm, a_uFieldValue) ( ((a_uFieldValue) & RT_BF_ZMASK(a_FieldNm) ) << RT_CONCAT(a_FieldNm,_SHIFT) ) … … 1540 1574 * @param a_FieldNm The field name prefix for getting at the _SHIFT and 1541 1575 * _MASK macros. 1542 * @sa #RT_BF_GET, #RT_BF_ MAKE1576 * @sa #RT_BF_GET, #RT_BF_SET, #RT_BF_CLEAR, #RT_BF_MAKE 1543 1577 */ 1544 1578 #define RT_BF_ZMASK(a_FieldNm) ( RT_CONCAT(a_FieldNm,_MASK) >> RT_CONCAT(a_FieldNm,_SHIFT) )
Note:
See TracChangeset
for help on using the changeset viewer.