C/C++ API Reference
Loading...
Searching...
No Matches
pw::ThreadStack< kStackSizeBytes > Class Template Reference

Overview

template<size_t kStackSizeBytes>
class pw::ThreadStack< kStackSizeBytes >

Declares a stack to use with a ThreadContext<> without an integrated stack.

Allocating stacks alongside the ThreadContext (e.g. with ThreadContext<1024>) is simpler, but more limited. Declaring a ThreadStack separately gives you more control. For example, you can:

  • Declare thread stacks at specific addresses (e.g. with PW_PLACE_IN_SECTION.)
  • Specify larger-than-native alignments (e.g. alignas(256) pw::ThreadStack<1024>).
  • Poison memory immediately before/after the stack to help detect overflow.

Public Types

using native = internal::ThreadStackPointer
 

Public Member Functions

constexpr native native_pointer ()
 
constexpr size_t native_size () const
 

The documentation for this class was generated from the following file: