From 4492c09b3b0325ae40de7569475e302f2b39b1c9 Mon Sep 17 00:00:00 2001 From: Peter Hall <33176108+IamPete1@users.noreply.github.com> Date: Tue, 20 Aug 2019 00:36:55 +0100 Subject: [PATCH] AP_HAL_SITL: Scheduler skip set stack on Cygwin --- libraries/AP_HAL_SITL/Scheduler.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/AP_HAL_SITL/Scheduler.cpp b/libraries/AP_HAL_SITL/Scheduler.cpp index 1ff369afd5..ed928bd98e 100644 --- a/libraries/AP_HAL_SITL/Scheduler.cpp +++ b/libraries/AP_HAL_SITL/Scheduler.cpp @@ -289,9 +289,11 @@ bool Scheduler::thread_create(AP_HAL::MemberProc proc, const char *name, uint32_ a->name = name; pthread_attr_init(&a->attr); +#if !defined(__CYGWIN__) && !defined(__CYGWIN64__) if (pthread_attr_setstack(&a->attr, a->stack, alloc_stack) != 0) { AP_HAL::panic("Failed to set stack of size %u for thread %s", alloc_stack, name); } +#endif if (pthread_create(&thread, &a->attr, thread_create_trampoline, a) != 0) { goto failed; }