diff options
author | inmarket <andrewh@inmarket.com.au> | 2013-11-17 20:23:41 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2013-11-17 20:23:41 +1000 |
commit | 6a2fc9a647b1c674cad841e5eef5dc0a4b7dbd1f (patch) | |
tree | a0f6d9ae437e0901a903e59281abf9a6796ce725 /include/gos | |
parent | 9a5a4808701e12c0efb8609b644756370ca8b691 (diff) | |
download | uGFX-6a2fc9a647b1c674cad841e5eef5dc0a4b7dbd1f.tar.gz uGFX-6a2fc9a647b1c674cad841e5eef5dc0a4b7dbd1f.tar.bz2 uGFX-6a2fc9a647b1c674cad841e5eef5dc0a4b7dbd1f.zip |
Better definitions for null functions in the GOS layer
Diffstat (limited to 'include/gos')
-rw-r--r-- | include/gos/chibios.h | 4 | ||||
-rw-r--r-- | include/gos/linux.h | 2 | ||||
-rw-r--r-- | include/gos/osx.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/include/gos/chibios.h b/include/gos/chibios.h index 5193587a..e9d3e8d2 100644 --- a/include/gos/chibios.h +++ b/include/gos/chibios.h @@ -73,7 +73,7 @@ extern "C" { #define gfxSystemLock() chSysLock() #define gfxSystemUnlock() chSysUnlock() #define gfxMutexInit(pmutex) chMtxInit(pmutex) -#define gfxMutexDestroy(pmutex) {} +#define gfxMutexDestroy(pmutex) (void)pmutex #define gfxMutexEnter(pmutex) chMtxLock(pmutex) #define gfxMutexExit(pmutex) chMtxUnlock() void *gfxRealloc(void *ptr, size_t oldsz, size_t newsz); @@ -89,7 +89,7 @@ void gfxSemSignalI(gfxSem *psem); gfxThreadHandle gfxThreadCreate(void *stackarea, size_t stacksz, threadpriority_t prio, DECLARE_THREAD_FUNCTION((*fn),p), void *param); #define gfxThreadWait(thread) chThdWait(thread) #define gfxThreadMe() chThdSelf() -#define gfxThreadClose(thread) {} +#define gfxThreadClose(thread) (void)thread #ifdef __cplusplus } diff --git a/include/gos/linux.h b/include/gos/linux.h index 508b2b68..f8b049e9 100644 --- a/include/gos/linux.h +++ b/include/gos/linux.h @@ -41,7 +41,7 @@ typedef pthread_mutex_t gfxMutex; #define gfxMillisecondsToTicks(ms) (ms) #define gfxYield() pthread_yield() #define gfxThreadMe() pthread_self() -#define gfxThreadClose(th) {} +#define gfxThreadClose(th) (void)th #define gfxMutexInit(pmtx) pthread_mutex_init(pmtx, 0) #define gfxMutexDestroy(pmtx) pthread_mutex_destroy(pmtx) #define gfxMutexEnter(pmtx) pthread_mutex_lock(pmtx) diff --git a/include/gos/osx.h b/include/gos/osx.h index 3f36aaff..56e0551e 100644 --- a/include/gos/osx.h +++ b/include/gos/osx.h @@ -40,7 +40,7 @@ typedef pthread_mutex_t gfxMutex; #define gfxMillisecondsToTicks(ms) (ms) #define gfxYield() sched_yield() #define gfxThreadMe() pthread_self() -#define gfxThreadClose(th) {} +#define gfxThreadClose(th) (void)th #define gfxMutexInit(pmtx) pthread_mutex_init(pmtx, 0) #define gfxMutexDestroy(pmtx) pthread_mutex_destroy(pmtx) #define gfxMutexEnter(pmtx) pthread_mutex_lock(pmtx) |