Adding new THREAD_RETURN macro to other ports
This commit is contained in:
parent
e6867c4e48
commit
83e51779ed
@ -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 {
|
||||
|
@ -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;
|
||||
|
@ -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 {
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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(;;)
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user