+#ifdef AO_STACK_CANARY
+static void
+ao_check_stack_canary(void)
+{
+ if (ao_cur_task->bottom_canary != AO_STACK_CANARY_VALUE)
+ ao_panic(AO_PANIC_STACK);
+ if (ao_cur_task->top_canary != AO_STACK_CANARY_VALUE)
+ ao_panic(AO_PANIC_STACK);
+}
+#else
+#define ao_check_stack_canary()
+#endif
+