diff options
| author | Bernard Xiong <[email protected]> | 2019-06-25 21:33:36 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-06-25 21:33:36 +0800 |
| commit | 2f1ab871381cfd6888c0214693e2580a07fdce05 (patch) | |
| tree | 7b912e7c1bd1766beee1516eb1baa996fbd1a823 /components/cplusplus | |
| parent | 4712956b228321285a28fb7a681f84950933b9ea (diff) | |
| parent | 759848122e47775cfd8a0e9e3e7a2fa7189754c4 (diff) | |
Merge pull request #2808 from tyustli/cpp_thread
fix cpp thread class error
Diffstat (limited to 'components/cplusplus')
| -rw-r--r-- | components/cplusplus/Thread.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/components/cplusplus/Thread.cpp b/components/cplusplus/Thread.cpp index 0f6315d178..9b2a2ad5e0 100644 --- a/components/cplusplus/Thread.cpp +++ b/components/cplusplus/Thread.cpp @@ -14,7 +14,7 @@ Thread::Thread(rt_uint32_t stack_size, rt_uint8_t priority, rt_uint32_t tick, const char *name) -: _entry(RT_NULL), _param(RT_NULL), started(false) + : _entry(RT_NULL), _param(RT_NULL), started(false) { rt_event_init(&_event, name, 0); @@ -32,7 +32,7 @@ Thread::Thread(void (*entry)(void *p), rt_uint8_t priority, rt_uint32_t tick, const char *name) -: _entry(RT_NULL), _param(p), started(false) + : _entry(entry), _param(p), started(false) { rt_event_init(&_event, name, 0); @@ -46,6 +46,7 @@ Thread::Thread(void (*entry)(void *p), Thread::~Thread() { + rt_event_detach(&_event); rt_thread_delete(_thread); } |
