Running multiple thread instances of the same function. (See MultiThread Program for an example on how to use it)
Dependents: MutliThread Server_Multi_Client HelloWorld C027_SupportTest ... more
Diff: Threads.h
- Revision:
- 2:46b56c9086f2
- Parent:
- 0:266b0dc4f8d0
- Child:
- 3:d370bed31f45
--- a/Threads.h Sat Jun 29 21:17:24 2013 +0000 +++ b/Threads.h Sat Jun 29 22:05:28 2013 +0000 @@ -20,6 +20,13 @@ #include "mbed.h" #include "cmsis_os.h" -int initThread(osThreadDef_t ***addresOfThreads,os_pthread pthread); -int reAlloc(osThreadDef_t ***addresOfThreads,os_pthread pthread,int numberOfThreads); +typedef struct ThreadList +{ + osThreadDef_t *thread; + osThreadId id; + struct ThreadList* nextThread; +}ThreadList; + +int initThread(ThreadList **addresOfTL,os_pthread pthread,ThreadList** addresOfThread); + #endif