4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-02-19 02:21:32 +08:00

16590 Commits

Author SHA1 Message Date
yangpeng
74ecb5261e [components/net/at]修复大数据量传输socket断开后可能丢数据的问题 2024-11-20 16:37:32 +08:00
hydevcode
5a47564988 [action] Recursive folder lookup attachconfig.yml 2024-11-20 16:37:32 +08:00
liuchao
b86e5d1cfc [components][finsh]在RT_USING_POSIX_STDIO时,使用get_console获取当前console描述符 2024-11-20 16:37:32 +08:00
Supper Thomas
5870a7ba8a [action] add the yml file support 2024-11-20 16:37:32 +08:00
kurisaw
20f73558eb Specification submission 2024-11-20 16:37:32 +08:00
kurisaw
5fc2aaa440 [net][lwip] lwip hook functions are provided to provide greater flexibility for unknown Ethernet protocols 2024-11-20 16:37:32 +08:00
yangpeng
a672ae13ed [components/net/at]修复at socket信号量释放异常 2024-11-20 16:37:32 +08:00
zhangjianwu
5bdad14add [GD32]更新GD32E503V文档 2024-11-20 16:37:31 +08:00
GuEe-GUI
75b4e400ad [COMPILER/FEATURE] Support rt_packed
__ARMCC_VERSION:         https://smtp.keil.com/support/man/docs/armcc/armcc_chr1359124980173.htm
__IAR_SYSTEMS_ICC__:     <Not Found>
__GNUC__:                https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.html#index-packed-type-attribute
__ADSPBLACKFIN__:        <Not Found>
_MSC_VER:                https://learn.microsoft.com/en-us/cpp/preprocessor/pack?view=msvc-170
__TI_COMPILER_VERSION__: https://software-dl.ti.com/codegen/docs/tiarmclang/rel1_3_0_LTS/migration_guide/migrating_c_and_cpp_source/pragmas_and_attributes.html
__TASKING__:             https://resources.tasking.com/sites/default/files/2021-02/TASKING_Alignment%20Requirements%20Restrictions_WEB.pdf

Usage:
```c
rt_packed(struct object1
{
    int dword;
    char byte;
});
typedef struct object1 object1;

rt_packed(struct object2
{
    int dword;
    char byte;
});
```

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-11-20 16:37:31 +08:00
Shell
a49d964c0b 🚚 renaming: move smp to smp_call 2024-11-20 16:37:31 +08:00
Shell
dff29e3d0f utest: smp_call: add smoke test cases
Signed-off-by: Shell <smokewood@qq.com>
2024-11-20 16:37:31 +08:00
Shell
733109996a feat: smp_call: added signaling call_req
This patch introduces `rt_smp_call_request` API to handle queued
requests across cores with user provided data buffer, which provides a
way to request IPI through a non-blocking pattern.

It also resolved several issues in the old implementation:
- Multiple requests from different cores can not be queued in the work
  object of the target core.
- Data racing on `rt_smp_work` of same core. If multiple requests came
  in turns, or if the call is used by the target cpu, while a new
  request is coming, the value will be overwrite.
- Memory vulnerability. The rt_smp_event is allocated on stack, though
  the caller may not wait until the call is done.
- API naming problem. Actually we don't provide a way to issue an IPI to
  ANY core in mask. What the API do is aligned to MANY pattern.
- FUNC_IPI registering to PIC.

Changes:
- Declared and configured the new `RT_SMP_CALL_IPI` to support
  functional IPIs for task requests across cores.
- Replaced the single `rt_smp_work` array with `call_req_cores` to
  manage per-core call requests safely.
- Added `_call_req_take` and `_call_req_release` functions for atomic
  handling of request lifetimes, preventing data race conditions.
- Replaced single event handling with a queue-based approach
  (`call_queue`) for efficient multi-request processing per core.
- Introduced `rt_smp_call_ipi_handler` to process queued requests,
  reducing IPI contention by only sending new requests when needed.
- Implemented `_smp_call_remote_request` to handle remote requests
  with specific flags, enabling more flexible core-to-core task
  signaling.
- Refined `rt_smp_call_req_init` to initialize and track requests
  with atomic usage flags, mitigating potential memory vulnerabilities.

Signed-off-by: Shell <smokewood@qq.com>
2024-11-20 16:37:31 +08:00
Shell
ca9aa271a2 feat: rtatomic: lockless single linked list
Signed-off-by: Shell <smokewood@qq.com>
2024-11-20 16:37:31 +08:00
Shell
fc383fbed9 feat: Added rt_interrupt_context* family for nested interrupt handling
These changes introduce the rt_interrupt_context family, providing a
mechanism for managing nested interrupts. The context management
ensures proper storage and retrieval of interrupt states, improving
reliability in nested interrupt scenarios by enabling context tracking
across different interrupt levels. This enhancement is essential for
platforms where nested interrupt handling is crucial, such as in real-
time or multi-threaded applications.

Changes:
- Defined rt_interrupt_context structure with context and node fields
  in `rtdef.h` to support nested interrupts.
- Added rt_slist_pop function in `rtservice.h` for simplified node
  removal in singly linked lists.
- Declared rt_interrupt_context_push, rt_interrupt_context_pop, and
  rt_interrupt_context_get functions in `rtthread.h` to manage the
  interrupt/exception stack.
- Modified AArch64 CPU support in `cpuport.h` to include
  rt_hw_show_register for debugging registers.
- Refactored `_rt_hw_trap_irq` in `trap.c` for context-aware IRQ
  handling, with stack push/pop logic to handle nested contexts.
- Implemented interrupt context push, pop, and retrieval logic in
  `irq.c` to manage context at the CPU level.

Signed-off-by: Shell <smokewood@qq.com>
2024-11-20 16:37:31 +08:00
zhangjianwu
8452c1d727 [BSP][GD32]add gd32e503v-eval 2024-11-20 16:37:31 +08:00
Kai
5bc63aa90c [libcpu][cortex-m7] use hw atomic 2024-11-20 16:37:31 +08:00
rcitachi
f11a58aa19 [libc] modify function names to resolve naming conflicts 2024-11-20 16:37:31 +08:00
andeyqi
5b2eccf42e [BSP][FRDM-MCX-C444] Adapter IAR 9.60 project 2024-11-20 16:37:30 +08:00
XYX12306
ba3ff18912 [bsp][renesas] initial commit for ra6e2-fpb 2024-11-20 16:37:30 +08:00
ryancw
673b507174 [src][clock] RT_TICK_PER_SECOND为1000时tick不用进行转换 2024-11-20 16:37:30 +08:00
Kai
8c9a25aaa6 [bsp][hc32] 修复SPI驱动的片选脚获取方式 2024-11-20 16:37:30 +08:00
Tian Xufeng
2552042edb [bsp][raspberry-pico] 修复rtconfig.h SPI1部分引脚错误问题 2024-11-20 16:37:30 +08:00
Li-Dongze
8987cefb21 [BSP]添加nrf52840的.ci文件,修复因rt_hw_pin_init引起的finsh警告,修复rtc编译报错 (#9583)
添加nrf52840的.ci文件,修复因rt_hw_pin_init引起的finsh警告,修复rtc编译报错
2024-11-20 16:37:30 +08:00
KunYi Chen
15e50e38c0 fix: suppress unused warnings when DEBUG disabled
When RT_USING_DEBUG is disabled, variables used only in RT_ASSERT
statements become unused, triggering -Wunused-but-set-variable compiler
warnings. These variables are essential for runtime assertions in debug
builds but appear unused in release builds.

Example:
- Variables used in RT_ASSERT(var != RT_NULL) checks
- Affects multiple drivers and components using RT_ASSERT

This is a general cleanup to improve code compilation without affecting
functionality.
2024-11-20 16:37:30 +08:00
Supper Thomas
39f3bd9dd2 [doc] Update PULL_REQUEST_TEMPLATE.md
添加PR部分CI提醒
2024-11-20 16:37:30 +08:00
Kai
21351f44a6 add missing extern "C" in header to support cpp 2024-11-20 16:37:30 +08:00
Yuqiang Wang
d05b8e55e3 [kernel] Specification interrupt nested level variable declaration type (#9568) 2024-11-20 16:37:30 +08:00
hydevcode
2d1c9b6227 [action] add nrf5340 ci config 2024-11-20 16:37:30 +08:00
GuEe-GUI
5a442a2f46 [DM/FEATURE] DM Device IDA management
Drivers can manage their own IDs without having to concern
themselves with the register/unregister in system

Link: https://github.com/RT-Thread/rt-thread/issues/9534

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-10-23 19:50:20 +08:00
zhangjing
fed7c9acda [src][signal]:fix issue with inconsistency between sig_mask and sigaddset implementations when using musl libc 2024-10-22 20:59:05 +08:00
Shell
cfe1768815 fixup: smart: sys_mount: UAF vulnerability
This patch addresses a use-after-free (UAF) vulnerability in the
sys_mount. The issue occurred due to improper handling of memory
deallocation, which could lead to crashes or undefined behavior on user
request of mounting.

Changes made:
- Moved the `rt_free(copy_source)` function call to occur after the necessary
  operations are completed, preventing premature deallocation of memory.

Signed-off-by: Shell <smokewood@qq.com>
2024-10-21 17:15:52 +08:00
CYFS
fabee02c38
[ci][rsoc]fix fm33lc026 yc3121-pos build issue (#9564)
* [ci]fix fm33lc026 yc3121-pos build issue

* [ci]rm airm2m/air105
2024-10-21 15:15:05 +08:00
heyuanjie87
b14a14057c 解决编译错误 2024-10-21 13:05:08 +08:00
heyuanjie87
08888b6e23 去除多余空格 2024-10-21 13:05:08 +08:00
heyuanjie87
063e6e7c0c 解决编译警告 2024-10-21 13:05:08 +08:00
heyuanjie87
1045bcb9df 给使用独立的defunct线程添加限制条件 2024-10-21 13:05:08 +08:00
heyuanjie87
2351981e83 分离defunct 2024-10-21 13:05:08 +08:00
heyuanjie87
e2b311c3b5 [kernel]在smart模式也启用"回收线程"
lwp的某些资源回收放到了后台,其中会引起线程挂起,而idle不应该被挂起
2024-10-21 13:05:08 +08:00
CYFS
fc6f3c0403 [bsp][fm33lc026]fix path issue 2024-10-20 12:18:28 -04:00
CYFS
7e123fb187 [bsp][fm33lc026]add link 2024-10-20 12:18:28 -04:00
CYFS
45812e43a6 [bsp][yichip]fix bug 2024-10-20 12:18:28 -04:00
Shell
81181e101f feat: bsp: fit into the new thread context 2024-10-19 15:19:41 -04:00
Shell
645b3c6015 feat: remove RT_USING_SCHED_THREAD_CTX
Prepare for the next release by removing the compatible codes for v5.1.0
and before.

Changes:

- Remove the compatible macros and Kconfig options for the old struct
  rt_thread layout.

Signed-off-by: Shell <smokewood@qq.com>
2024-10-19 15:19:41 -04:00
CYFS
76adf376db
[bsp][stm32][rsoc]串口超时判断逻辑有问题
[bsp][stm32]fix uart bug
2024-10-19 12:24:42 -04:00
sakumisu
4c206caf8b
update(cherryusb): update to v1.4.1 2024-10-19 12:23:21 -04:00
CYFS
e47f478e12
[bsp][rsoc]Fix compilation issues with bsp of hc32l136 2024-10-19 12:23:07 -04:00
Supper Thomas
ab964e1e5a [action] fix the fail action 2024-10-19 19:20:03 +08:00
heyuanjie87
49b6614763
[libcpu]添加对riscv vector的支持 (#9531)
[libcpu]添加对riscv vector的支持
2024-10-16 14:10:09 +08:00
Meco Man
47d941388b [bsp][stm32] fix variable init
fix https://github.com/RT-Thread/rt-thread/pull/9525
2024-10-14 22:12:21 -04:00
LZerro
8c1cd39d80
[bsp][Infineon]add drv_eth (#9527)
[bsp][Infineon]add xmc7200 eth driver #9527

---------

Co-authored-by: LZerro <lizhenhong@rt-thread.com>
2024-10-14 11:30:00 +08:00