diff options
author | inmarket <andrewh@inmarket.com.au> | 2013-06-02 18:57:22 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2013-06-02 18:57:22 +1000 |
commit | 1c258a82738e145953fc9cf40c68dcce6db87d92 (patch) | |
tree | c151e882619714d696276ce29ef3388dce6e1866 /src/gos/chibios.c | |
parent | c2a4f9a5d616f5b18a965652d7492aacd377e5e2 (diff) | |
download | uGFX-1c258a82738e145953fc9cf40c68dcce6db87d92.tar.gz uGFX-1c258a82738e145953fc9cf40c68dcce6db87d92.tar.bz2 uGFX-1c258a82738e145953fc9cf40c68dcce6db87d92.zip |
GOS updates
Diffstat (limited to 'src/gos/chibios.c')
-rw-r--r-- | src/gos/chibios.c | 7 |
1 files changed, 4 insertions, 3 deletions
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 */ |