Skip to content

Commit 5983ccb

Browse files
committed
modify components/libc/cplusplus/os/cxx_Thread.cpp
1 parent 41c5aa0 commit 5983ccb

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

components/libc/cplusplus/os/cxx_Thread.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ using namespace rtthread;
1919
* @param name Thread name
2020
*/
2121
Thread::Thread(rt_uint32_t stack_size,
22-
rt_uint8_t priority,
22+
rt_uint8_t priority,
2323
rt_uint32_t tick,
24-
const char *name) :
25-
_entry(RT_NULL), _param(RT_NULL), started(false)
24+
const char *name)
25+
: _entry(RT_NULL), _param(RT_NULL), started(false)
2626
{
2727
rt_event_init(&_event, name, 0);
2828

@@ -46,10 +46,10 @@ Thread::Thread(rt_uint32_t stack_size,
4646
Thread::Thread(void (*entry)(void *p),
4747
void *p,
4848
rt_uint32_t stack_size,
49-
rt_uint8_t priority,
49+
rt_uint8_t priority,
5050
rt_uint32_t tick,
51-
const char *name) :
52-
_entry(entry), _param(p), started(false)
51+
const char *name)
52+
: _entry(entry), _param(p), started(false)
5353
{
5454
rt_event_init(&_event, name, 0);
5555

@@ -136,9 +136,9 @@ rt_err_t Thread::wait(int32_t millisec)
136136
}
137137

138138
/**
139-
* @brief the thread with a timeout.
139+
* @brief Join the thread with a timeout.
140140
* @param millisec Timeout in milliseconds.
141-
* @return Status code indicating the execution status.
141+
* @return RT_EOK if the thread completed within the timeout, error code otherwise.
142142
*/
143143
rt_err_t Thread::join(int32_t millisec)
144144
{
@@ -156,4 +156,4 @@ rt_err_t Thread::join(int32_t millisec)
156156
{
157157
return -RT_ENOSYS;
158158
}
159-
}
159+
}

0 commit comments

Comments
 (0)