1 #ifndef ARCH_AARCH64_COMMON_H
2 #define ARCH_AARCH64_COMMON_H
38 static void AllocMainCothread();
39 static void ValidateStackSize(
const size_t size);
40 static void *AllocStack(
const size_t bytes);
41 static void DeallocStack(
void*
stack);
42 static void CothreadReturned();
43 static void DereferenceCallInfo(CallInfo *info);
52 static void Prepare(
Aarch64 *thread,
const Entry &entry);
97 static thread_local std::array<uintptr_t, kMainStackSize> gMainStack;
101 bool ownsStack{
false};
104 void *stackTop{
nullptr};
std::function< void()> Entry
Type alias for an entry point of a cothread.
Architecture specific methods for working with cothreads on 64 bit ARM machines.
static constexpr const size_t kMainStackSize
static constexpr const size_t kDefaultStackSize
static constexpr const size_t kStackAlignment
static constexpr const size_t kContextSaveAreaSize
Aarch64(const Entry &entry, const size_t stackSize=0)
void switchTo(CothreadImpl *from) override
Implementation details (including architecture/platform specific code) for the library.
CothreadImpl * AllocKernelThreadWrapper()
Abstract interface for a platform implementation of cothreads.
std::span< uintptr_t > stack
Stack used by this cothread, if any.