rt: Only call check_stack_alignment on linux

This commit is contained in:
Brian Anderson 2011-12-16 12:09:34 -08:00
parent 121c420184
commit ab4f35c1f1

View File

@ -19,8 +19,13 @@
// correctly. Strategically placed at entry to upcalls because they begin on
// the rust stack and happen frequently enough to catch most stack changes,
// including at the beginning of all landing pads.
// FIXME: Only seems to work on linux
#ifdef __linux__
extern "C" void
check_stack_alignment() __attribute__ ((aligned (16)));
#else
static void check_stack_alignment() { }
#endif
#define SWITCH_STACK(A, F) upcall_call_shim_on_c_stack((void*)A, (void*)F)