|
libcosmos
Linux C++ System Programming Library
|
Flags used in MapSettings. More...
#include <mman.hxx>
Inheritance diagram for cosmos::mem::MapFlags:Public Member Functions | |
| void | setTLBPageSize (size_t page_size) |
| Sets the TLB page size if MapFlag::HUGETLB is set. | |
Public Member Functions inherited from cosmos::BitMask< MapFlag > | |
| constexpr | BitMask () |
| Sets all bits to zero. | |
| BitMask (const All a) | |
| Sets all bits to one. | |
| constexpr | BitMask (const std::initializer_list< MapFlag > &init_list) |
| Sets only the flags found in the given initializer list. | |
| constexpr | BitMask (const MapFlag val) |
| Sets exactly the given value to one. | |
| constexpr | BitMask (const EnumBaseType value) |
| Sets exactly the given primitive type bitmask. | |
| EnumBaseType | raw () const |
| Returns the raw bitfield integer. | |
| operator std::string () const | |
| Return a string representation of the bit mask. | |
| bool | operator[] (const MapFlag flag) const |
| Returns a boolean value for the given value,. | |
| std::string | toString () const |
| BitMask & | set (const All) |
| Sets all bits it the set. | |
| BitMask & | set (const MapFlag val, bool on_off=true) |
| Set or unset the given value. | |
| BitMask & | set (const std::initializer_list< MapFlag > &flags) |
| BitMask & | set (const BitMask other) |
Sets all the bits that are also set in other. | |
| BitMask & | reset () |
| Sets all bits to zero. | |
| BitMask & | reset (const MapFlag val) |
| Zeroes the given value. | |
| BitMask & | reset (const std::initializer_list< MapFlag > &flags) |
| Zeroes all of the given values. | |
| BitMask & | reset (const BitMask other) |
| BitMask | reset (const BitMask other) const |
| BitMask & | limit (const std::initializer_list< MapFlag > &flags) |
| Sets all bits to zero except the given flags. | |
| BitMask & | limit (const MapFlag flag) |
| Sets all bits to zero except the given flag. | |
| BitMask & | limit (const BitMask other) |
| Sets all bits to zero except the bits in the given mask. | |
| BitMask | limit (const BitMask other) const |
| BitMask & | flip () |
| Flip every bit in the bit mask. | |
| BitMask & | flip (const MapFlag val) |
| Flips the given value. | |
| size_t | count () const |
| Returns the number of set bits. | |
| constexpr size_t | size () const |
| Returns the maximum number of bits that can be stored in the bit mask. | |
| bool | test (const MapFlag val) const |
| Returns whether the given value is set. | |
| bool | testAny (const MapFlag val) const |
Returns whether any of the bits of val are set. | |
| bool | only (const MapFlag val) const |
| Returns whether this is the only value set. | |
| bool | any () const |
| Returns whether any bit in the bitset is set. | |
| bool | allOf (const std::initializer_list< MapFlag > &flags) const |
| Tests whether all of the given values are set. | |
| bool | allOf (const BitMask other) const |
| bool | anyOf (const std::initializer_list< MapFlag > &flags) const |
| Returns whether any of the given values is set. | |
| bool | anyOf (const BitMask other) const |
| bool | none () const |
| Returns whether no bit in the bitset is set. | |
| bool | operator== (const BitMask &other) const |
| bool | operator!= (const BitMask &other) const |
| bool | operator& (const MapFlag val) const |
| Checks whether any bit of the given value is set,. | |
| MapFlag | operator& (const BitMask &other) const |
| returns an ENUM value containing only the values found in both masks. | |
| BitMask | operator~ () const |
Additional Inherited Members | |
Public Types inherited from cosmos::BitMask< MapFlag > | |
| using | EnumBaseType |
Static Public Attributes inherited from cosmos::BitMask< MapFlag > | |
| static constexpr All | all |
Protected Attributes inherited from cosmos::BitMask< MapFlag > | |
| EnumBaseType | m_flags |
Flags used in MapSettings.
| void cosmos::mem::MapFlags::setTLBPageSize | ( | size_t | page_size | ) |
Sets the TLB page size if MapFlag::HUGETLB is set.
The given page_size needs to be a power-of-two. The supported TLB sizes depend on the CPU architecture.
Definition at line 86 of file mman.cxx.