AP_HAL_SITL: Makes scheduler compile under Mac OS
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
This commit is contained in:
parent
bf274cd9db
commit
ab31fcb8f4
@ -5,7 +5,11 @@
|
|||||||
#include "UARTDriver.h"
|
#include "UARTDriver.h"
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <fenv.h>
|
#include <fenv.h>
|
||||||
|
#if defined (__clang__)
|
||||||
|
#include <stdlib.h>
|
||||||
|
#else
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
#endif
|
||||||
#include <AP_Common/Semaphore.h>
|
#include <AP_Common/Semaphore.h>
|
||||||
|
|
||||||
using namespace HALSITL;
|
using namespace HALSITL;
|
||||||
@ -263,7 +267,7 @@ bool Scheduler::thread_create(AP_HAL::MemberProc proc, const char *name, uint32_
|
|||||||
if (!a->f) {
|
if (!a->f) {
|
||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
a->stack = memalign(4096, alloc_stack);
|
posix_memalign(&a->stack, 4096, alloc_stack);
|
||||||
if (!a->stack) {
|
if (!a->stack) {
|
||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user