From 1c258a82738e145953fc9cf40c68dcce6db87d92 Mon Sep 17 00:00:00 2001 From: inmarket Date: Sun, 2 Jun 2013 18:57:22 +1000 Subject: GOS updates --- src/gos/chibios.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/gos/chibios.c') diff --git a/src/gos/chibios.c b/src/gos/chibios.c index 7e369824..40e176ce 100644 --- a/src/gos/chibios.c +++ b/src/gos/chibios.c @@ -86,13 +86,14 @@ void gfxSemSignalI(gfxSem *psem) { chSemSignalI(&psem->sem); } -bool_t gfxCreateThread(void *stackarea, size_t stacksz, threadpriority_t prio, gfxThreadFunction fn, void *param) { +gfxThreadHandle gfxThreadCreate(void *stackarea, size_t stacksz, threadpriority_t prio, DECLARE_THREAD_FUNCTION((*fn),p), void *param) { if (!stackarea) { if (!stacksz) stacksz = 256; - return chThdCreateFromHeap(0, stacksz, prio, fn, param) != 0; + return chThdCreateFromHeap(0, stacksz, prio, fn, param); } - return stacksz && chThdCreateStatic(stackarea, stacksz, prio, fn, param) != NULL; + if (!stacksz) return NULL; + return chThdCreateStatic(stackarea, stacksz, prio, fn, param); } #endif /* GFX_USE_OS_CHIBIOS */ -- cgit v1.2.3