A small library that's provide helpers for programmers
Diff: MyThread.cpp
- Revision:
- 2:6cc4c56940af
- Parent:
- 1:ee7a5f05513d
- Child:
- 4:eef83534b19e
--- a/MyThread.cpp Tue Feb 17 11:55:34 2015 +0000 +++ b/MyThread.cpp Fri Mar 27 16:48:12 2015 +0000 @@ -2,6 +2,13 @@ #include "MyThread.h" #include "MyLibc.h" +#define __DEBUG__ 5 +#ifndef __MODULE__ +#define __MODULE__ "MyThread.cpp" +#endif +#include "MyDebug.h" + + void MainTrampoline(void const *args){ MyThread *mt = (MyThread*) args; mt->Main(); @@ -9,7 +16,8 @@ mt->t->terminate(); } -MyThread::MyThread(const char* name){ +MyThread::MyThread(const char* name,uint32_t sz){ + stackSize = sz; tName = strdup(name); } @@ -26,7 +34,7 @@ } void MyThread::Run(void){ - t = new Thread(MainTrampoline,this); + t = new Thread(MainTrampoline,this,osPriorityNormal,stackSize); } void MyThread::Wait(int32_t ms){