AP_HAL_SITL: Scheduler skip set stack on Cygwin

This commit is contained in:
Peter Hall 2019-08-20 00:36:55 +01:00 committed by Tom Pittenger
parent c0ffdd7efb
commit 4492c09b3b

View File

@ -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;
}