Some comments have been initially added as a bignner task.
components/libc/cplusplus/os/cxx_Semaphore.cpp
components/libc/cplusplus/os/cxx_Thread.cpp
components/libc/cplusplus/utest/tc_atomic.cpp
components/libc/cplusplus/utest/tc_smartptr.cpp
components/libc/cplusplus/utest/tc_thread.cpp
Signed-off-by:Liu Chengtao<2739960959@qq.com>
The old CLK is can't link all hardware clock cell in system that the
API of layout such as 'set_parent' can't work as expected.
Some hareware clock cell need some flags to prevent some dangerous behaviors, eg:
When a clock cell is link to the PMU, the SoC will power-down if the cell is
disable.
The new CLK can do it, and make the CLK drivers implemented easier from
TRM/DataSheet.
Signed-off-by: GuEe-GUI <2991707448@qq.com>
* Enhance thread suspend function with stricter checks
Refactor thread suspension logic to improve clarity and correctness.
* Clean up formatting in thread.c
Removed unnecessary blank line in thread.c.
* Refactor thread suspend state handling
Refactor thread suspension logic to improve clarity and maintainability.
* Update thread.c
* Fix indentation for RT_THREAD_SUSPEND_KILLABLE case
Hardware spinlock modules provide hardware assistance for
synchronization and mutual exclusion between heterogeneous processors
and those not operating under a single, shared operating system.
Signed-off-by: GuEe-GUI <2991707448@qq.com>
Currently, the print information of this test case fails to demonstrate that
the high-priority thread has preempted the low-priority thread. This is because
when the high-priority thread prints the thread list, there is no information
about the low-priority thread (tlow), as tlow has already completed execution
and been destroyed. Therefore, the current execution logic cannot confirm the
successful completion of the preemption operation.
Solution: After the low-priority thread (tlow) releases the lock, add a busy-wait
loop while(!finish_flag);. At this point, when the high-priority thread (thigh)
prints the thread list information, tlow can be observed in the ready state, indicating
that it has been preempted by thigh.
Signed-off-by: Mengchen Teng <teng_mengchen@163.com>
* [DM/PIC] Fixup SMP CPU mask list when CPU < 4
* [DM][PIC] Fix#10998
The size of cpumask is `RT_CPUS_NR`, memset force to space will
overflow in stack.
Signed-off-by: GuEe-GUI <2991707448@qq.com>
* [DM][LED] Fixup LED check status string match
* [DM][LED] Update LED blink cycle to heartbeat
* [DM][LED] Fixup gpio-led memory alloc to zero
* [DM][LED] Update LED common drivers
* [DM][MISC] Make Kconfig(ADC/PWM) import for DM
* [Driver][MISC][ADC] Fixup ADC
1. Fixup error no.
2. Fixup type of control for args.
3. Fixup value no init.
* [Driver][MISC][PWM] Enable `rt_pwm_get` API
Signed-off-by: GuEe-GUI <2991707448@qq.com>
1. Add get id match data API.
2. Set I2C device name default before adding to bus.
3. Add Kconfig import for DM.
Signed-off-by: GuEe-GUI <2991707448@qq.com>
1. Fixup RT_DIV_ROUND_DOWN_ULL and RT_DIV_ROUND_UP_ULL, rt_do_div.
2. Support RT_DIV_ROUND_CLOSEST_ULL.
3. Make new DIV API.
Signed-off-by: GuEe-GUI <2991707448@qq.com>