class LibcThreadTestStorage
Defined at line 57 of file ../../sdk/lib/c/threads/thread-storage-test-utils.h
This is a helper subclass for just recording the thread_block and tp_offset
from a ThreadStorage::Allocate and checking the resulting storage. Users can
also supply their own `expect_true` function for printing assertion messages.
Example usage:
LibcThreadTestStorage thread_storage(layout);
auto result = thread_storage.Allocate(handles, stack_size, guard_size);
thread_storage.Check([](bool check, std::string_view message){
ZX_ASSERT_MSG(check, "%s", message.data());
});
Public Methods
void Check (fit::function<void (bool, std::string_view)> expect_true, Thread * result)
Defined at line 31 of file ../../sdk/lib/c/threads/thread-storage-test-utils.cc
void LibcThreadTestStorage (TlsLayout tls_layout)
Defined at line 59 of file ../../sdk/lib/c/threads/thread-storage-test-utils.h
zx::result<Thread *> Allocate (thrd_zx_create_handles_tallocate_from,PageRoundedSizestack_size,PageRoundedSizeguard_size,std::string_viewvmo_name)
Defined at line 67 of file ../../sdk/lib/c/threads/thread-storage-test-utils.h