xco_platform.h (1091B)
1 /* 2 * xco_platform_internal.h (arm64) — sizing and alignment constants. 3 * 4 * Found by the build's -I path (platform/arm64) and included by xco.h. 5 * Only #defines: the actual platform context struct definition is 6 * private to platform/arm64/xco_platform.c. 7 */ 8 9 #ifndef XCO_PLATFORM_INTERNAL_H 10 #define XCO_PLATFORM_INTERNAL_H 11 12 /* Stack alignment required by AAPCS at function call boundaries. */ 13 #define XCO_STACK_ALIGN 16 14 15 /* Implementation-detail constants used by xco.c to embed the platform 16 * context inside xco_impl_t without seeing the struct definition. 17 * platform/arm64/xco_platform.c verifies these match the real layout. */ 18 #define XCO__CTX_SIZE 176 /* sizeof(struct xco_platform_ctx) */ 19 #define XCO__CTX_ALIGN 16 /* _Alignof(struct xco_platform_ctx) */ 20 21 /* Size and alignment of xco_coro_t.priv. Must hold an xco_impl_t 22 * (defined in xco.c): a platform context + ~3 words of bookkeeping. 23 * xco.c verifies sufficiency with _Static_assert. */ 24 #define XCO_SIZE (XCO__CTX_SIZE + 48) 25 #define XCO_ALIGN XCO__CTX_ALIGN 26 27 #endif /* XCO_PLATFORM_INTERNAL_H */