Namespaces

Enumerations

enum class ThreadSafe : _Bool
Name Value
No 0
Yes 1

As names are often used for diagnostic purposes they might be accessed under various other

existing locks and to simplify usage they default to being thread safe by use of an internal

spinlock. Users can override this if they are already providing external synchronization.

Defined at line 24 of file ../../zircon/kernel/lib/fbl/include/fbl/name.h

enum class NodeOptions : uint64_t
Name Value Comments
None 0 --
AllowCopy (1 << 0)

By default, nodes will not allow either copy construction or copy
assignment. Directly copying the contents of node storage for a structure
which is currently in a container cannot be allowed. The result would be
to have two objects, one of which is actually in a container, and the other
of which is only sort-of in the container.

Because of this, if code attempts to expand either the copy constructor or
assignment operator, by default it will trigger a static assert.

It may be the case, however, that a user wishes to allow copying of their
structure while the source and destination structure are _not_ in any
containers. In this case, pass the NodeOptions::AllowCopy flag. Nodes
will permit copying, but will runtime ZX_DEBUG_ASSERT if either the source
or destination exist within a container at the time of the copy. In builds
with ZX_DEBUG_ASSERTs disabled, neither the source nor the destination's
internal node contents will be modified. So, in the case of the following
code:

MyStructure
&
A = *(container.begin());
MyStructure B = A;
MyStructure
&
C = get_a_structure_reference_from_somewhere();
C = A;

++ A will remain in the container unmodified.
++ B will be in no container (as it was just constructed).
++ C either will either remain in its container if it had been in one, or
will remain in no container if not.

Finally, it is possible that a user actually _does_ wish to copy the
contents of a structure out of a container using either copy construction
or using copy assignment. If this is the case, pass the
NodeOptions::AllowCopyFromContainer flag. In addition to allowing the copy
constructor and assignment operators, the debug asserts will be disabled in
this situation. Users may copy the contents of their node, but not mutate
any container membership state as part of the process.

AllowCopyFromContainer (1 << 1)

By default, nodes will not allow either copy construction or copy
assignment. Directly copying the contents of node storage for a structure
which is currently in a container cannot be allowed. The result would be
to have two objects, one of which is actually in a container, and the other
of which is only sort-of in the container.

Because of this, if code attempts to expand either the copy constructor or
assignment operator, by default it will trigger a static assert.

It may be the case, however, that a user wishes to allow copying of their
structure while the source and destination structure are _not_ in any
containers. In this case, pass the NodeOptions::AllowCopy flag. Nodes
will permit copying, but will runtime ZX_DEBUG_ASSERT if either the source
or destination exist within a container at the time of the copy. In builds
with ZX_DEBUG_ASSERTs disabled, neither the source nor the destination's
internal node contents will be modified. So, in the case of the following
code:

MyStructure
&
A = *(container.begin());
MyStructure B = A;
MyStructure
&
C = get_a_structure_reference_from_somewhere();
C = A;

++ A will remain in the container unmodified.
++ B will be in no container (as it was just constructed).
++ C either will either remain in its container if it had been in one, or
will remain in no container if not.

Finally, it is possible that a user actually _does_ wish to copy the
contents of a structure out of a container using either copy construction
or using copy assignment. If this is the case, pass the
NodeOptions::AllowCopyFromContainer flag. In addition to allowing the copy
constructor and assignment operators, the debug asserts will be disabled in
this situation. Users may copy the contents of their node, but not mutate
any container membership state as part of the process.

AllowMove (1 << 2)

See the AllowCopy and AllowCopyFromConainer flags for details. AllowMove
and AllowMoveFromContainer are the same, simply applied to the rvalue
constructor and assignment operators of the node.

AllowMoveFromContainer (1 << 3)

See the AllowCopy and AllowCopyFromConainer flags for details. AllowMove
and AllowMoveFromContainer are the same, simply applied to the rvalue
constructor and assignment operators of the node.

AllowCopyMove static_cast<uint64_t>(AllowCopy) | static_cast<uint64_t>(AllowMove)

Convenience definitions

AllowCopyMoveFromContainer static_cast<uint64_t>(AllowCopyFromContainer) | static_cast<uint64_t>(AllowMoveFromContainer)

Convenience definitions

AllowMultiContainerUptr (1 << 4)

Allow an object to exist in multiple containers at once, even if one or
more of those containers tracks the object using a unique_ptr (or any other
non-copyable pointer type).

Generally, it would be a mistake to define an object which can exist in
multiple containers concurrently, and track those objects in their
containers using unique_ptr semantics. In theory, it should be impossible
for two different containers to track the same object at the same time,
each using something like a unique_ptr. This would violate the uniqueness of
the pointer.

Because of this, the ContainableBaseClasses helper (see below) will, by
default, complain and refuse to build if someone attempts to use it in
conjunction with a Containable mix-in which tracks objects using
unique_ptr-style pointers if there are any other containers in the
Containable list.

There are special cases, however, where a user might want this behavior to
be permitted. Consider an object whose lifecycle is managed by a central
list of unique_ptrs, but which can also exist on a temporary list which
tracks the objects using raw pointers for strictly algorithmic purposes.
Provided that the user carefully ensures that the object does not disappear
from the central list while it exists on the temporary list, this should be
completely fine. More concretely, the following should be allowed provided
that the user opts in.

using MainList = fbl::TaggedDoublyLinkedList
<std
::unique_ptr
<Obj
>, MainListTag>;
using TmpList = fbl::TaggedSinglyLinkedList
<Obj
*, TmpListTag>;

fbl::Mutex all_objects_lock;
MainList all_objects TA_GUARDED(all_objects_lock);

void do_interesting_things() TA_EXCL(all_objects_lock) {
fbl::AutoLock lock(
&all
_objects_lock);
TmpList interesting_objects;

for (auto
&
obj : all_objects) {
if (object_is_interesting(obj)) {
interesting_objects.push(obj);
}
}

do_interesting_things_to_interesting_objects(std::move(interesting_objects));
}

Users who have carefully considered the lifecycle management of their
objects and wish to allow this behavior should pass the
AllowMultiContainerUptr option to their Containable mix-in.

AllowRemoveFromContainer (1 << 5)

Nodes with this flag permitted to be directly removed from their container,
without needing to go through the container's erase method.

AllowClearUnsafe (1 << 6)

Enables the |clear_unsafe| operation on containers of unmanaged pointers.

ReservedBits 0xF000000000000000

Reserved bits reserved for testing purposes and should always be ignored by
node implementations.

A set of flag-style options which can be applied to container nodes in order

to control and sanity check their behavior and compatibility at compile time.

To control node options, users pass a set of options to either the

containable mix-in class (SinglyLinkedLisable, DoublyLinkedListable, or

WAVLTreeContainable), or directly to the node instance in the case that the

user is specifying custom container traits.

Defined at line 64 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_container_utils.h

enum class HashTableOption
Name Value
DelayedInit 0

Defined at line 138 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_hash_table.h

enum class SlabAllocatorFlavor
Name Value
INSTANCED 0
STATIC 1
MANUAL_DELETE 2

Defined at line 280 of file ../../zircon/system/ulib/fbl/include/fbl/slab_allocator.h

enum class SlabAllocatorOptions : uint64_t
Name Value Comments
None 0 --
EnableObjectCount (1 << 0)

When set, causes the slab allocator to track how many objects are allocated
at any point in time, as well as the maximum number of currently allocated
objects over the life of the allocator.

AllowManualDeleteOperator (1 << 1)

When set, MANUAL slab allocator objects will not assert when their delete
operator is invoked. This allows objects to exist either as manual slab
allocated objects, or as objects directly allocated from the heap.

Flags passed as a template argument to SlabAllocatorTraits which may be used

to control optional behaviors of the SlabAllocator and its objects.

Defined at line 288 of file ../../zircon/system/ulib/fbl/include/fbl/slab_allocator.h

enum class SizeOrder
Name Value
N 0
Constant 1

An enumeration which can be used as a template argument on list types to

control the order of operation needed to compute the size of the list. When

set to SizeOrder::N, the list's size will not be maintained and there will be

no valid size() method to call. The only way to fetch the size of a list

would be via |size_slow()|. Alternatively, a user may specify

SizeOrder::Constant. In this case, the storage size of the list itself will

grow by a size_t, and the size of the list will be maintained as elements are

added and removed.

Defined at line 364 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_container_utils.h

Records

Functions

  • template <typename T>
    bool operator== (const Vector<T> & a, const Vector<T> & b)

    Defined at line 14 of file ../../zircon/kernel/lib/efi/string/tests/string_tests.cc

  • String StringPrintf (const char * format)

    Formats |printf()|-like input and returns it as an |fbl::String|.

    Defined at line 17 of file ../../zircon/system/ulib/fbl/string_printf.cc

  • template <size_t HighBit, size_t LowBit, typename ReturnType, typename SourceType>
    ReturnType ExtractBits (SourceType input)

    Extracts the bit range [HightBit:LowBit] (inclusive) from a numerical input.

    Defined at line 17 of file ../../zircon/system/ulib/fbl/include/fbl/bits.h

  • template <size_t HighBit, size_t LowBit, typename ReturnType, typename SourceType>
    ReturnType ExtractBits (SourceType input)

    Extracts the bit range [HightBit:LowBit] (inclusive) from a numerical input.

    Defined at line 17 of file ../../zircon/system/ulib/fbl/include/fbl/bits.h

  • template <size_t HighBit, size_t LowBit, typename ReturnType, typename SourceType>
    ReturnType ExtractBits (SourceType input)

    Extracts the bit range [HightBit:LowBit] (inclusive) from a numerical input.

    Defined at line 17 of file ../../zircon/system/ulib/fbl/include/fbl/bits.h

  • String StringVPrintf (const char * format, va_list ap)

    Formats |vprintf()|-like input and returns it as an |fbl::String|.

  • RefPtr<T> AdoptRef (T * )
  • RefPtr<T> ImportFromRawPtr (T * )
  • template <typename T>
    bool operator!= (const Vector<T> & a, const Vector<T> & b)

    Defined at line 19 of file ../../zircon/kernel/lib/efi/string/tests/string_tests.cc

  • template <typename T>
    T UnalignedLoad (const void * source)

    Loads a value of type T at a potentially unaligned address.

    T must be bit-castable (see std::bit_cast documentation).

    Defined at line 19 of file ../../zircon/system/ulib/fbl/include/fbl/unaligned.h

  • template <class T, class U, class L = std::conditional_t<sizeof(T) >= sizeof(U), T, U>, class = std::enable_if_t<std::is_unsigned_v<T>>, class = std::enable_if_t<std::is_unsigned_v<U>>>
    const L round_up (const T & val_, const U & multiple_)

    round_up rounds up val until it is divisible by multiple.

    Zero is divisible by all multiples.

    Defined at line 22 of file ../../zircon/system/ulib/fbl/include/fbl/algorithm.h

  • template <typename T>
    const char * GetStringData (const T & value)

    Gets the character data from a string-like object.

    Defined at line 25 of file ../../zircon/system/ulib/fbl/include/fbl/string_traits.h

  • String StringVPrintf (const char * format, va_list ap)

    Formats |vprintf()|-like input and returns it as an |fbl::String|.

    Defined at line 25 of file ../../zircon/system/ulib/fbl/string_printf.cc

  • String StringVPrintf (const char * format, va_list ap)

    Formats |vprintf()|-like input and returns it as an |fbl::String|.

    Defined at line 25 of file ../../zircon/system/ulib/fbl/string_printf.cc

  • template <size_t Bit, typename ReturnType, typename SourceType>
    ReturnType ExtractBit (SourceType input)

    Defined at line 30 of file ../../zircon/system/ulib/fbl/include/fbl/bits.h

  • template <size_t Bit, typename ReturnType, typename SourceType>
    ReturnType ExtractBit (SourceType input)

    Defined at line 30 of file ../../zircon/system/ulib/fbl/include/fbl/bits.h

  • template <size_t Bit, typename ReturnType, typename SourceType>
    ReturnType ExtractBit (SourceType input)

    Defined at line 30 of file ../../zircon/system/ulib/fbl/include/fbl/bits.h

  • template <typename T>
    size_t GetStringLength (const T & value)

    Gets the length (in characters) of a string-like object.

    Defined at line 31 of file ../../zircon/system/ulib/fbl/include/fbl/string_traits.h

  • template <typename T>
    void UnalignedStore (void * dest, T value)

    Stores a value at a potentially unaligned destination address.

    T must be bit-castable (see std::bit_cast documentation).

    Defined at line 35 of file ../../zircon/system/ulib/fbl/include/fbl/unaligned.h

  • template <class T, class U, class L = std::conditional_t<sizeof(T) >= sizeof(U), T, U>, class = std::enable_if_t<std::is_unsigned_v<T>>, class = std::enable_if_t<std::is_unsigned_v<U>>>
    const L round_down (const T & val_, const U & multiple_)

    round_down rounds down val until it is divisible by multiple.

    Zero is divisible by all multiples.

    Defined at line 35 of file ../../zircon/system/ulib/fbl/include/fbl/algorithm.h

  • template <typename T, typename... Args>
    std::unique_ptr<T> make_unique_checked (AllocChecker & ac, Args &&... args)

    A version of std::make_unique that accepts an AllocChecker as its first argument.

    Defined at line 82 of file ../../zircon/system/ulib/fbl/include/fbl/alloc_checker.h

  • template <typename T, typename... Args>
    std::unique_ptr<T> make_unique_checked (AllocChecker & ac, Args &&... args)

    A version of std::make_unique that accepts an AllocChecker as its first argument.

    Defined at line 82 of file ../../zircon/system/ulib/fbl/include/fbl/alloc_checker.h

  • template <typename T, typename... Args>
    std::unique_ptr<T> make_unique_checked (AllocChecker * ac, Args &&... args)

    Defined at line 88 of file ../../zircon/system/ulib/fbl/include/fbl/alloc_checker.h

  • template <typename T, typename... Args>
    std::unique_ptr<T> make_unique_checked (AllocChecker * ac, Args &&... args)

    Defined at line 88 of file ../../zircon/system/ulib/fbl/include/fbl/alloc_checker.h

  • template <typename T, typename... Args>
    std::unique_ptr<T> make_unique_checked (AllocChecker & ac, size_t size)

    Defined at line 94 of file ../../zircon/system/ulib/fbl/include/fbl/alloc_checker.h

  • template <typename T, typename... Args>
    std::unique_ptr<T> make_unique_checked (AllocChecker & ac, size_t size)

    Defined at line 94 of file ../../zircon/system/ulib/fbl/include/fbl/alloc_checker.h

  • template <typename T, typename... Args>
    std::unique_ptr<T> make_unique_checked (AllocChecker & ac, size_t size)

    Defined at line 94 of file ../../zircon/system/ulib/fbl/include/fbl/alloc_checker.h

  • template <typename T, typename... Args>
    std::unique_ptr<T> make_unique_checked (AllocChecker & ac, size_t size)

    Defined at line 94 of file ../../zircon/system/ulib/fbl/include/fbl/alloc_checker.h

  • template <typename T, typename... Args>
    std::unique_ptr<T> make_unique_checked (AllocChecker & ac, size_t size)

    Defined at line 94 of file ../../zircon/system/ulib/fbl/include/fbl/alloc_checker.h

  • template <constructible_from<> T, typename... Args>
    std::unique_ptr<T> make_unique_checked (AllocChecker * ac, size_t size)

    Defined at line 101 of file ../../zircon/system/ulib/fbl/include/fbl/alloc_checker.h

  • template <constructible_from<> T, typename... Args>
    std::unique_ptr<T> make_unique_checked (AllocChecker * ac, size_t size)

    Defined at line 101 of file ../../zircon/system/ulib/fbl/include/fbl/alloc_checker.h

  • template <constructible_from<> T, typename... Args>
    std::unique_ptr<T> make_unique_checked (AllocChecker * ac, size_t size)

    Defined at line 101 of file ../../zircon/system/ulib/fbl/include/fbl/alloc_checker.h

  • template <constructible_from<> T, typename... Args>
    std::unique_ptr<T> make_unique_checked (AllocChecker * ac, size_t size)

    Defined at line 101 of file ../../zircon/system/ulib/fbl/include/fbl/alloc_checker.h

  • template <constructible_from<> T, typename... Args>
    std::unique_ptr<T> make_unique_checked (AllocChecker * ac, size_t size)

    Defined at line 101 of file ../../zircon/system/ulib/fbl/include/fbl/alloc_checker.h

  • template <default_initializable T>
    std::unique_ptr<T> make_unique_for_overwrite_checked (AllocChecker & ac)

    Likewise for std::make_unique_for_overwrite.

    Defined at line 108 of file ../../zircon/system/ulib/fbl/include/fbl/alloc_checker.h

  • template <default_initializable T>
    std::unique_ptr<T> make_unique_for_overwrite_checked (AllocChecker & ac)

    Likewise for std::make_unique_for_overwrite.

    Defined at line 108 of file ../../zircon/system/ulib/fbl/include/fbl/alloc_checker.h

  • bool operator== (const StrongInt<UniqueTagType, T> & lhs, const StrongInt<UniqueTagType, T> & rhs)

    Defined at line 111 of file ../../zircon/system/ulib/fbl/include/fbl/strong_int.h

  • bool operator!= (const StrongInt<UniqueTagType, T> & lhs, const StrongInt<UniqueTagType, T> & rhs)

    Defined at line 112 of file ../../zircon/system/ulib/fbl/include/fbl/strong_int.h

  • template <typename T>
    Array<T> MakeArray (fbl::AllocChecker * ac, size_t n)

    Allocate memory for an array of size `n`, default-constructing each element in the array.

    If the allocation fails, an array of size 0 is returned.

    Defined at line 112 of file ../../zircon/system/ulib/fbl/include/fbl/array.h

  • template <typename T>
    Array<T> MakeArray (fbl::AllocChecker * ac, size_t n)

    Allocate memory for an array of size `n`, default-constructing each element in the array.

    If the allocation fails, an array of size 0 is returned.

    Defined at line 112 of file ../../zircon/system/ulib/fbl/include/fbl/array.h

  • template <typename T>
    Array<T> MakeArray (fbl::AllocChecker * ac, size_t n)

    Allocate memory for an array of size `n`, default-constructing each element in the array.

    If the allocation fails, an array of size 0 is returned.

    Defined at line 112 of file ../../zircon/system/ulib/fbl/include/fbl/array.h

  • bool operator<= (const StrongInt<UniqueTagType, T> & lhs, const StrongInt<UniqueTagType, T> & rhs)

    Defined at line 113 of file ../../zircon/system/ulib/fbl/include/fbl/strong_int.h

  • bool operator>= (const StrongInt<UniqueTagType, T> & lhs, const StrongInt<UniqueTagType, T> & rhs)

    Defined at line 114 of file ../../zircon/system/ulib/fbl/include/fbl/strong_int.h

  • template <typename T>
    std::unique_ptr<T> make_unique_for_overwrite_checked (AllocChecker & ac, size_t size)

    Defined at line 114 of file ../../zircon/system/ulib/fbl/include/fbl/alloc_checker.h

  • template <typename T>
    std::unique_ptr<T> make_unique_for_overwrite_checked (AllocChecker & ac, size_t size)

    Defined at line 114 of file ../../zircon/system/ulib/fbl/include/fbl/alloc_checker.h

  • template <typename T>
    std::unique_ptr<T> make_unique_for_overwrite_checked (AllocChecker & ac, size_t size)

    Defined at line 114 of file ../../zircon/system/ulib/fbl/include/fbl/alloc_checker.h

  • template <typename T>
    std::unique_ptr<T> make_unique_for_overwrite_checked (AllocChecker & ac, size_t size)

    Defined at line 114 of file ../../zircon/system/ulib/fbl/include/fbl/alloc_checker.h

  • template <typename T>
    std::unique_ptr<T> make_unique_for_overwrite_checked (AllocChecker & ac, size_t size)

    Defined at line 114 of file ../../zircon/system/ulib/fbl/include/fbl/alloc_checker.h

  • bool operator< (const StrongInt<UniqueTagType, T> & lhs, const StrongInt<UniqueTagType, T> & rhs)

    Defined at line 115 of file ../../zircon/system/ulib/fbl/include/fbl/strong_int.h

  • bool operator> (const StrongInt<UniqueTagType, T> & lhs, const StrongInt<UniqueTagType, T> & rhs)

    Defined at line 116 of file ../../zircon/system/ulib/fbl/include/fbl/strong_int.h

  • template <typename T>
    Array<T> MakeArray (size_t n)

    Allocate memory for an array of size `n`.

    Defined at line 123 of file ../../zircon/system/ulib/fbl/include/fbl/array.h

  • template <typename T>
    Array<T> MakeArray (size_t n)

    Allocate memory for an array of size `n`.

    Defined at line 123 of file ../../zircon/system/ulib/fbl/include/fbl/array.h

  • template <typename T>
    Array<T> MakeArray (size_t n)

    Allocate memory for an array of size `n`.

    Defined at line 123 of file ../../zircon/system/ulib/fbl/include/fbl/array.h

  • StrongInt<UniqueTagType, T> operator+ (const StrongInt<UniqueTagType, T> & lhs, const StrongInt<UniqueTagType, T> & rhs)

    Defined at line 127 of file ../../zircon/system/ulib/fbl/include/fbl/strong_int.h

  • StrongInt<UniqueTagType, T> operator- (const StrongInt<UniqueTagType, T> & lhs, const StrongInt<UniqueTagType, T> & rhs)

    Defined at line 128 of file ../../zircon/system/ulib/fbl/include/fbl/strong_int.h

  • StrongInt<UniqueTagType, T> operator& (const StrongInt<UniqueTagType, T> & lhs, const StrongInt<UniqueTagType, T> & rhs)

    Defined at line 129 of file ../../zircon/system/ulib/fbl/include/fbl/strong_int.h

  • StrongInt<UniqueTagType, T> operator| (const StrongInt<UniqueTagType, T> & lhs, const StrongInt<UniqueTagType, T> & rhs)

    Defined at line 130 of file ../../zircon/system/ulib/fbl/include/fbl/strong_int.h

  • StrongInt<UniqueTagType, T> operator^ (const StrongInt<UniqueTagType, T> & lhs, const StrongInt<UniqueTagType, T> & rhs)

    Defined at line 131 of file ../../zircon/system/ulib/fbl/include/fbl/strong_int.h

  • StrongInt<UniqueTagType, T> operator% (const StrongInt<UniqueTagType, T> & lhs, const StrongInt<UniqueTagType, T> & rhs)

    Defined at line 132 of file ../../zircon/system/ulib/fbl/include/fbl/strong_int.h

  • StrongInt<UniqueTagType, T> operator/ (const StrongInt<UniqueTagType, T> & lhs, const T & rhs)

    Defined at line 144 of file ../../zircon/system/ulib/fbl/include/fbl/strong_int.h

  • StrongInt<UniqueTagType, T> operator* (const StrongInt<UniqueTagType, T> & lhs, const T & rhs)

    Defined at line 145 of file ../../zircon/system/ulib/fbl/include/fbl/strong_int.h

  • template <typename T, typename LockCapability>
    RefPtr<T> MakeRefPtrUpgradeFromRaw (T * ptr, const LockCapability & lock)

    Constructs a RefPtr from a raw T* which is being held alive by RefPtr

    with the caveat that the existing RefPtr might be in the process of

    destructing the T object. When the T object is in the destructor, the

    resulting RefPtr is null, otherwise the resulting RefPtr points to T*

    with the updated reference count.

    The only way for this to be a valid pattern is that the call is made

    while holding |lock| and that the same lock also is used to protect the

    value of T* .

    This pattern is needed in collaborating objects which cannot hold a

    RefPtr to each other because it would cause a reference cycle. Instead

    there is a raw pointer from one to the other and a RefPtr in the

    other direction. When needed the raw pointer can be upgraded via

    MakeRefPtrUpgradeFromRaw() and operated outside |lock|.

    For example:

    class Holder: public RefCounted

    <Holder

    > {

    public:

    void add_client(Client* c) {

    Autolock al(

    &lock

    _);

    client_ = c;

    }

    void remove_client() {

    Autolock al(

    &lock

    _);

    client_ = nullptr;

    }

    void PassClient(Bar* bar) {

    fbl::RefPtr

    <Client

    > rc_client;

    {

    Autolock al(

    &lock

    _);

    if (client_) {

    rc_client = fbl::internal::MakeRefPtrUpgradeFromRaw(client_, lock_);

    }

    }

    if (rc_client) {

    bar->Client(std::move(rc_client)); // Bar might keep a ref to client.

    } else {

    bar->OnNoClient();

    }

    }

    private:

    fbl::Mutex lock_;

    Client* client __TA_REQUIRES(lock_);

    };

    class Client: public RefCounted

    <Client

    > {

    public:

    Client(RefPtr

    <Holder

    > holder) : holder_(std::move(holder)) {

    holder_->add_client(this);

    }

    ~Client() {

    holder_->remove_client();

    }

    private:

    fbl::RefPtr

    <Holder

    > holder_;

    };

    Defined at line 145 of file ../../zircon/system/ulib/fbl/include/fbl/ref_counted_upgradeable.h

  • StrongInt<UniqueTagType, T> operator% (const StrongInt<UniqueTagType, T> & lhs, const T & rhs)

    Defined at line 146 of file ../../zircon/system/ulib/fbl/include/fbl/strong_int.h

  • StrongInt<UniqueTagType, T> operator<< (const StrongInt<UniqueTagType, T> & lhs, const T & rhs)

    Defined at line 147 of file ../../zircon/system/ulib/fbl/include/fbl/strong_int.h

  • StrongInt<UniqueTagType, T> operator>> (const StrongInt<UniqueTagType, T> & lhs, const T & rhs)

    Defined at line 148 of file ../../zircon/system/ulib/fbl/include/fbl/strong_int.h

  • StrongInt<UniqueTagType, T> operator* (const T & lhs, const StrongInt<UniqueTagType, T> & rhs)

    <value

    type> * StrongInt. The symmetrical case is implemented in the macro above.

    Defined at line 151 of file ../../zircon/system/ulib/fbl/include/fbl/strong_int.h

  • bool operator== (const String & lhs, const String & rhs)

    Defined at line 151 of file ../../zircon/system/ulib/fbl/string.cc

  • T operator/ (const StrongInt<UniqueTagType, T> & lhs, const StrongInt<UniqueTagType, T> & rhs)

    StrongInt / StrongInt == value_type.

    Defined at line 156 of file ../../zircon/system/ulib/fbl/include/fbl/strong_int.h

  • fbl::NodeOptions operator| (fbl::NodeOptions A, fbl::NodeOptions B)

    Helper functions which make it a bit easier to use the enum class NodeOptions

    in a flag style fashion.

    The | operator will take two options and or them together to produce their

    composition without needing to do all sorts of nasty casting. In other

    words:

    fbl::NodeOptions::AllowX | fbl::NodeOptions::AllowY

    is legal.

    The

    &

    operator is overloaded to perform the bitwise and of the

    underlying flags and test against zero returning a bool. This allows us to

    say things like:

    if constexpr (SomeOptions | fbl::NodeOptions::AllowX) { ... }

    Defined at line 196 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_container_utils.h

  • bool operator& (fbl::NodeOptions A, fbl::NodeOptions B)

    Defined at line 202 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_container_utils.h

  • bool operator!= (const String & lhs, const String & rhs)

    Defined at line 206 of file ../../zircon/system/ulib/fbl/include/fbl/string.h

  • bool operator< (const String & lhs, const String & rhs)

    Defined at line 208 of file ../../zircon/system/ulib/fbl/include/fbl/string.h

  • bool operator> (const String & lhs, const String & rhs)

    Defined at line 210 of file ../../zircon/system/ulib/fbl/include/fbl/string.h

  • bool operator<= (const String & lhs, const String & rhs)

    Defined at line 212 of file ../../zircon/system/ulib/fbl/include/fbl/string.h

  • bool operator>= (const String & lhs, const String & rhs)

    Defined at line 214 of file ../../zircon/system/ulib/fbl/include/fbl/string.h

  • std::ostream & operator<< (std::ostream & stream, const fbl::String & string)

    Defined at line 216 of file ../../zircon/system/ulib/fbl/include/fbl/string.h

  • std::ostream & operator<< (std::ostream & stream, const fbl::String & string)

    Defined at line 216 of file ../../zircon/system/ulib/fbl/include/fbl/string.h

  • template <typename T>
    RefPtr<T> AdoptRef (T * ptr)

    Constructs a RefPtr from a fresh object that has not been referenced before.

    Use like:

    RefPtr

    <Happy

    > h = AdoptRef(new Happy);

    if (!h)

    // Deal with allocation failure here

    h->DoStuff();

    Defined at line 228 of file ../../zircon/system/ulib/fbl/include/fbl/ref_ptr.h

  • template <typename T>
    T * ExportToRawPtr (RefPtr<T> * ptr)

    Export a pointer from a smart pointer to a raw pointer without modifying its

    reference count. The caller is responsible for maintaining the reference

    count, likely by calling ImportFromRawPtr() later on.

    Use this to store a pointer in code that can't use the C++

    type directly, such as in pure C code.

    Defined at line 239 of file ../../zircon/system/ulib/fbl/include/fbl/ref_ptr.h

  • template <typename T>
    RefPtr<T> ImportFromRawPtr (T * )

    Imports from a raw pointer to a RefPtr. Does not modify the reference count

    of the object. This should be used on values that have previously been

    exported with ExportToRawPtr().

    Defined at line 247 of file ../../zircon/system/ulib/fbl/include/fbl/ref_ptr.h

  • template <typename T, typename... Args>
    RefPtr<T> MakeRefCounted (Args &&... args)

    Defined at line 289 of file ../../zircon/system/ulib/fbl/include/fbl/ref_ptr.h

  • template <typename T, typename... Args>
    RefPtr<T> MakeRefCountedChecked (AllocChecker * ac, Args &&... args)

    Defined at line 294 of file ../../zircon/system/ulib/fbl/include/fbl/ref_ptr.h

  • fbl::SlabAllocatorOptions operator| (fbl::SlabAllocatorOptions A, fbl::SlabAllocatorOptions B)

    Helper operators which allow us to easily combine and test slab allocator

    option bitfields using a standard bitwise operator syntax. For example:

    Options = SlabAllocatorOptions::OptA | SlabAllocatorOptions::OptB

    if constexpr (Options

    &

    SlabAllocatorOptions::OptA) { ... }

    Defined at line 308 of file ../../zircon/system/ulib/fbl/include/fbl/slab_allocator.h

  • bool operator& (fbl::SlabAllocatorOptions A, fbl::SlabAllocatorOptions B)

    Defined at line 315 of file ../../zircon/system/ulib/fbl/include/fbl/slab_allocator.h

  • template <typename TagType = DefaultObjectTag, typename Containable>
    bool InContainer (const Containable & c)

    These are free function because making it a member function presents

    complicated lookup issues since the specific Containable classes exist as

    members of the ContainableBaseClasses

    <

    ...>, and you'd need to say

    obj.template GetContainableByTag

    <TagType

    >().InContainer (or

    RemoveFromContainer), which is super ugly.

    Defined at line 339 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_container_utils.h

  • template <typename TagType = DefaultObjectTagtypename Containable>
    auto RemoveFromContainer (Containable & c)

    Defined at line 348 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_container_utils.h

Variables

const bool is_string_like_v

Defined at line 43 of file ../../zircon/system/ulib/fbl/include/fbl/string_traits.h

const bool is_string_like_v

Defined at line 43 of file ../../zircon/system/ulib/fbl/include/fbl/string_traits.h

const bool is_string_like_v

Defined at line 43 of file ../../zircon/system/ulib/fbl/include/fbl/string_traits.h

const bool is_string_like_v

Defined at line 43 of file ../../zircon/system/ulib/fbl/include/fbl/string_traits.h

const bool is_string_like_v

Defined at line 43 of file ../../zircon/system/ulib/fbl/include/fbl/string_traits.h

const bool is_string_like_v

Defined at line 43 of file ../../zircon/system/ulib/fbl/include/fbl/string_traits.h

const bool is_string_like_v

Defined at line 43 of file ../../zircon/system/ulib/fbl/include/fbl/string_traits.h

const bool is_string_like_v

Defined at line 43 of file ../../zircon/system/ulib/fbl/include/fbl/string_traits.h

const bool is_string_like_v

Defined at line 43 of file ../../zircon/system/ulib/fbl/include/fbl/string_traits.h

const bool is_string_like_v

Defined at line 43 of file ../../zircon/system/ulib/fbl/include/fbl/string_traits.h

const bool is_string_like_v

Defined at line 43 of file ../../zircon/system/ulib/fbl/include/fbl/string_traits.h

const bool is_string_like_v

Defined at line 43 of file ../../zircon/system/ulib/fbl/include/fbl/string_traits.h

const bool is_string_like_v

Defined at line 43 of file ../../zircon/system/ulib/fbl/include/fbl/string_traits.h

const bool is_string_like_v

Defined at line 43 of file ../../zircon/system/ulib/fbl/include/fbl/string_traits.h

const bool is_string_like_v

Defined at line 43 of file ../../zircon/system/ulib/fbl/include/fbl/string_traits.h

const bool is_string_like_v

Defined at line 43 of file ../../zircon/system/ulib/fbl/include/fbl/string_traits.h

const bool is_string_like_v

Defined at line 43 of file ../../zircon/system/ulib/fbl/include/fbl/string_traits.h

const bool is_string_like_v

Defined at line 44 of file ../../zircon/system/ulib/fbl/include/fbl/string_traits.h

const size_t kDynamicBucketCount

Defined at line 137 of file ../../zircon/system/ulib/fbl/include/fbl/intrusive_hash_table.h