class Processargs

Defined at line 25 of file ../../sdk/lib/c/startup/processargs.h

This saves the data from the

<zircon

/processargs.h> bootstrap message. It's

allocated in its own GuardedPageBlock. It's actually variable-sized, with a

flexible array member at the end.

Public Methods

int argc ()

Defined at line 44 of file ../../sdk/lib/c/startup/processargs.h

std::span<char *> argv ()

Defined at line 46 of file ../../sdk/lib/c/startup/processargs.h

std::span<char *> envp ()

Defined at line 48 of file ../../sdk/lib/c/startup/processargs.h

std::span<uint32_t> handle_info ()

The handles and their info must be kept alive for zx_take_startup_handle.

Defined at line 54 of file ../../sdk/lib/c/startup/processargs.h

std::span<zx_handle_t> handles ()

Defined at line 55 of file ../../sdk/lib/c/startup/processargs.h

decltype(transform_view<views::all_t<std::ranges::iota_view<unsigned long, unsigned long>>, (lambda at ../../sdk/lib/c/startup/processargs.h:61:18)>(std::forward<std::ranges::iota_view<unsigned long, unsigned long>>(__range), std::forward<(lambda at ../../sdk/lib/c/startup/processargs.h:61:18) &>(__f))) HandleTakers (std::span<uint32_t> handle_info, std::span<zx_handle_t> handles)

Returns a range of {uint32_t info, zx::handle take()} pairs such that

calling take() consumes the handle that matches info while calling

take(std::in_place) just borrows it.

Defined at line 60 of file ../../sdk/lib/c/startup/processargs.h

zx_startup_handles_t GetHandles (zx_handle_t bootstrap_handle)

This is the implementation function aliased to _zx_startup_get_handles.

It's not really meant to be used as a weak symbol per se--it will always

be defined and won't ever be overridden by another definition. However,

declaring it as weak prevents the compiler's language-level logic from

presuming that it cannot possibly compare equal to another function symbol

(as aliases are outside the C/C++ linkage model) without also hiding their

equality from LTO constant propagation and dead-code elimination (as

laundering either pointer through an empty asm would, for example).

Defined at line 94 of file ../../sdk/lib/c/startup/processargs-get-handles.cc

void Processargs (const Buffer & msg, std::span<const zx_handle_t> msg_handles, Buffer::Actual actual, uint32_t strtab_off)

This is only called here, so it doesn't need to be in the header.

Defined at line 62 of file ../../sdk/lib/c/startup/processargs-get-handles.cc

std::span<char *> names ()

The names table is only used by fdio startup (__libc_extensions_init),

which doesn't save pointers into it. But it has to be allocated somewhere

without using the normal heap, and it's not likely to bump up the size of

the GuardedPageBlock so it's not worth the juggling to trim it when dead.

Defined at line 86 of file ../../sdk/lib/c/startup/processargs.h