Skip to content

Commit 0d6b97c

Browse files
committed
[bugfix]components:libc:cplusplus: Repair the comment code.
os:cxx_Thread.c The word at beginning of the comment on line 104 is capitalized. utest:tc_thread.cpp 1. A space has been added before the comment end symbol in lines 33,36,51. 2. Remove trailing spaces to comply with the rtthread encoding standard in lines 21,27,34,39,44,48. signed-off-by: Liu Chengtao<2739960959@qq.com>
1 parent 5983ccb commit 0d6b97c

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

components/libc/cplusplus/os/cxx_Thread.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ void Thread::sleep(int32_t millisec)
101101
}
102102

103103
/**
104-
* @brief function to run the thread's entry function.
104+
* @brief Function to run the thread's entry function.
105105
*/
106106
void Thread::func(Thread *pThis)
107107
{

components/libc/cplusplus/utest/tc_thread.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,37 +18,37 @@
1818
*/
1919
static void test_thread(void)
2020
{
21-
int count = 0;
21+
int count = 0;
2222

23-
/* Lambda function to increment the count.*/
23+
/* Lambda function to increment the count. */
2424
auto func = [&]() mutable {
2525
for (int i = 0; i < 100; ++i)
2626
{
27-
++count;
27+
++count;
2828
}
2929
};
3030

3131
/* Create and run a thread executing the lambda function. */
3232
std::thread t1(func);
33-
/* Wait for the thread to finish execution.*/
34-
t1.join();
33+
/* Wait for the thread to finish execution. */
34+
t1.join();
3535

36-
/* Verify if the count is as expected after the first thread execution.*/
36+
/* Verify if the count is as expected after the first thread execution. */
3737
if (count != 100)
3838
{
39-
uassert_false(1);
39+
uassert_false(1);
4040
}
4141

4242
/* Create and run another thread executing the same lambda function. */
4343
std::thread t2(func);
44-
t2.join();
44+
t2.join();
4545

4646
if (count != 200)
4747
{
48-
uassert_false(1);
48+
uassert_false(1);
4949
}
5050

51-
/* If both assertions passed, the test is successful.*/
51+
/* If both assertions passed, the test is successful. */
5252
uassert_true(1);
5353
}
5454

0 commit comments

Comments
 (0)