mirror of
https://github.com/patchzyy/wiicompiled
synced 2026-09-10 09:11:52 -04:00
5c76e2b0df
* feature: add apple silicon native macOS support - #81 * (macos): Fix crash This fixes a crash when viewing the rear camera * fix(macos): keep interpolated presentation on main thread * fix(macos): supply Retro-WFC payload during setup * perf(windows): compile out flat-memory fallback check * remove duplicate smoke test * test(macos): name and focus host platform tests * fix(macos): validate Retro-WFC payload cache * fix(payload): preserve staged file access failures * Limit flat-page checks to variable-page hosts --------- Co-authored-by: patchzyy <64382339+patchzyy@users.noreply.github.com>
25 lines
803 B
C++
25 lines
803 B
C++
#pragma once
|
|
|
|
#include <cstddef>
|
|
|
|
// HostContext is the deliberately small boundary between the guest scheduler
|
|
// and the host's cooperative-context facility. Windows uses native Fibers and
|
|
// Linux uses libco; macOS AArch64 uses the local assembly backend because it
|
|
// must preserve Darwin's platform-reserved x18 register, which libco's AArch64
|
|
// backend does not save. Its handles are only valid on the thread that
|
|
// initialized the scheduler.
|
|
namespace HostContext {
|
|
|
|
using Handle = void*;
|
|
using Entry = void (*)(void*);
|
|
|
|
bool InitializeScheduler(Handle* scheduler);
|
|
void ShutdownScheduler(Handle scheduler);
|
|
|
|
Handle Create(std::size_t stackSize, Entry entry, void* argument);
|
|
void Destroy(Handle context);
|
|
bool IsCurrent(Handle context);
|
|
void Switch(Handle target);
|
|
|
|
} // namespace HostContext
|