+static inline void *
+ao_stack_top(struct ao_task *task)
+{
+ uint8_t *top = &task->stack8[AO_STACK_SIZE];
+
+ /* Subtract off the TLS space, but keep the resulting
+ * stack 8-byte aligned
+ */
+#if USE_TLS
+ return top - ((_tls_size() + 7) & ~3);
+#else
+ return top;
+#endif
+}
+