Adding new THREAD_RETURN macro to other ports

ugfx_release_2.6
Joel Bodenmann 2015-10-19 22:29:35 +02:00
parent 32eae60422
commit 46619f60cd
8 changed files with 8 additions and 0 deletions

View File

@ -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 {

View File

@ -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;

View File

@ -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 {

View File

@ -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)

View File

@ -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)

View File

@ -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(;;)

View File

@ -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

View File

@ -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)