aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@seriouslyembedded.com>2015-10-19 22:29:35 +0200
committerinmarket <andrewh@inmarket.com.au>2015-10-23 17:22:05 +1000
commit83e51779ed7f84a81de1a05e86834577a0e57438 (patch)
tree37a57142bf7f9e9b49bfba85c5f85e3cdfeab530 /src
parente6867c4e48bfea921a23f45f1c1517bee975ed2b (diff)
downloaduGFX-83e51779ed7f84a81de1a05e86834577a0e57438.tar.gz
uGFX-83e51779ed7f84a81de1a05e86834577a0e57438.tar.bz2
uGFX-83e51779ed7f84a81de1a05e86834577a0e57438.zip
Adding new THREAD_RETURN macro to other ports
Diffstat (limited to 'src')
-rw-r--r--src/gos/gos_chibios.h1
-rw-r--r--src/gos/gos_ecos.h1
-rw-r--r--src/gos/gos_freertos.h1
-rw-r--r--src/gos/gos_linux.h1
-rw-r--r--src/gos/gos_osx.h1
-rw-r--r--src/gos/gos_rawrtos.h1
-rw-r--r--src/gos/gos_win32.h1
-rw-r--r--src/gos/gos_x_threads.h1
8 files changed, 8 insertions, 0 deletions
diff --git a/src/gos/gos_chibios.h b/src/gos/gos_chibios.h
index c4755020..30a65423 100644
--- a/src/gos/gos_chibios.h
+++ b/src/gos/gos_chibios.h
@@ -56,6 +56,7 @@ typedef tprio_t threadpriority_t;
#define DECLARE_THREAD_STACK(name, sz) WORKING_AREA(name, sz)
#define DECLARE_THREAD_FUNCTION(fnName, param) threadreturn_t fnName(void *param)
+#define THREAD_RETURN(retval) return retval
#if CH_KERNEL_MAJOR == 2
typedef struct {
diff --git a/src/gos/gos_ecos.h b/src/gos/gos_ecos.h
index be9037b6..cd5678df 100644
--- a/src/gos/gos_ecos.h
+++ b/src/gos/gos_ecos.h
@@ -46,6 +46,7 @@ typedef cyg_handle_t gfxThreadHandle;
#define DECLARE_THREAD_STACK(name, sz) struct { cyg_thread t; unsigned char stk[sz]; } name[1]
#define DECLARE_THREAD_FUNCTION(fnName, param) threadreturn_t fnName(cyg_addrword_t param)
+#define THREAD_RETURN(retval)
typedef struct {
cyg_sem_t sem;
diff --git a/src/gos/gos_freertos.h b/src/gos/gos_freertos.h
index d6dcf5c5..574e13ae 100644
--- a/src/gos/gos_freertos.h
+++ b/src/gos/gos_freertos.h
@@ -62,6 +62,7 @@ typedef portBASE_TYPE threadpriority_t;
/* FreeRTOS will allocate the stack when creating the thread, so pass the size instead of a working area */
#define DECLARE_THREAD_STACK(name, sz) size_t *name = (size_t *)sz
#define DECLARE_THREAD_FUNCTION(fnName, param) threadreturn_t fnName(void *param)
+#define THREAD_RETURN(retval)
portTickType MS2ST(portTickType ms);
typedef struct {
diff --git a/src/gos/gos_linux.h b/src/gos/gos_linux.h
index 39cfbc85..fe406cb6 100644
--- a/src/gos/gos_linux.h
+++ b/src/gos/gos_linux.h
@@ -37,6 +37,7 @@ typedef pthread_mutex_t gfxMutex;
#define DECLARE_THREAD_FUNCTION(fnName, param) threadreturn_t fnName(void *param)
#define DECLARE_THREAD_STACK(name, sz) uint8_t name[0];
+#define THREAD_RETURN(retval) return retval
#define gfxExit() exit(0)
#define gfxAlloc(sz) malloc(sz)
diff --git a/src/gos/gos_osx.h b/src/gos/gos_osx.h
index 635a8934..e5764b81 100644
--- a/src/gos/gos_osx.h
+++ b/src/gos/gos_osx.h
@@ -27,6 +27,7 @@ typedef pthread_mutex_t gfxMutex;
#define DECLARE_THREAD_FUNCTION(fnName, param) threadreturn_t fnName(void *param)
#define DECLARE_THREAD_STACK(name, sz) uint8_t name[0];
+#define THREAD_RETURN(retval) return reval
#define gfxExit() exit(0)
#define gfxAlloc(sz) malloc(sz)
diff --git a/src/gos/gos_rawrtos.h b/src/gos/gos_rawrtos.h
index eeb5119d..f352d681 100644
--- a/src/gos/gos_rawrtos.h
+++ b/src/gos/gos_rawrtos.h
@@ -27,6 +27,7 @@ typedef RAW_TASK_OBJ* gfxThreadHandle;
#define DECLARE_THREAD_FUNCTION(fnName, param) threadreturn_t fnName(void *param)
#define DECLARE_THREAD_STACK(name, sz) PORT_STACK name[sz];
+#define THREAD_RETURN(retval) return retval
#define gfxHalt(msg) for(;;)
#define gfxExit() for(;;)
diff --git a/src/gos/gos_win32.h b/src/gos/gos_win32.h
index 7e4f051b..bac74d46 100644
--- a/src/gos/gos_win32.h
+++ b/src/gos/gos_win32.h
@@ -48,6 +48,7 @@ typedef int threadpriority_t;
#define DECLARE_THREAD_FUNCTION(fnName, param) threadreturn_t WINAPI fnName(void *param)
#define DECLARE_THREAD_STACK(name, sz) uint8_t name[0];
+#define THREAD_RETURN(retval) return retval
#define TIME_IMMEDIATE 0
#define TIME_INFINITE INFINITE
diff --git a/src/gos/gos_x_threads.h b/src/gos/gos_x_threads.h
index 78c30ac4..ee7a9cd0 100644
--- a/src/gos/gos_x_threads.h
+++ b/src/gos/gos_x_threads.h
@@ -32,6 +32,7 @@ typedef int threadpriority_t;
#define DECLARE_THREAD_FUNCTION(fnName, param) threadreturn_t fnName(void *param)
#define DECLARE_THREAD_STACK(name, sz) uint8_t name[sz];
+#define THREAD_RETURN(retval) return retval
#define TIME_IMMEDIATE 0
#define TIME_INFINITE ((delaytime_t)-1)