Commit Graph

788 Commits

Author SHA1 Message Date
yandld 635e16a8d5 [libc] 修复 ctime()死机问题 2024-09-03 18:13:09 -04:00
zx568073531 b19672ccc1 修复TLS内存申请没有初始化问题 2024-08-25 01:36:31 -04:00
SeliverWang f7f0afe03e 修复TLS申请内存后没有初始化问题 2024-08-25 01:36:31 -04:00
Z8MAN8 1d646bcf56 Add RT_USING_RTC conditional compilation protection in ctimer.c
Analysis: There is still an omission in the preprocessing control of
_control_rtc in 24b0a81 ("Add RT_USING_RTC conditional
compilation protection in ctimer.c")

Solution: Add RT_USING_RTC preprocessing control to missing
_control_rtc

Signed-off-by: Shicheng Chu <1468559561@qq.com>
2024-08-12 15:56:17 +08:00
Z8MAN8 24b0a8174f Add RT_USING_RTC conditional compilation protection in ctimer.c
Analysis: RT_USING_RTC preprocessing is used in 47cd52d ("修复不
使能 RT_USING_DEVICE 时编译报错") to control the reference of
rtdevice.h, as well as the implementation and call of _control_rtc,
but there are some omissions.

Solution: Add RT_USING_RTC preprocessing control to missing
_control_rtc

Signed-off-by: Shicheng Chu <1468559561@qq.com>
Reviewed-by: Chen Wang <unicorn_wang@outlook.com>
2024-08-11 14:37:36 +08:00
马龙伟 47cd52d162
修复不使能 RT_USING_DEVICE 时编译报错 (#9145)
* 修复不使能 RT_USING_DEVICE 时编译报错

* 删除 ctime.c 中多余引用
2024-08-04 09:56:47 +08:00
Rui 3b1d4e9222
fix Compilation error in "driver.c", "completion_up.c", "syslog.c" and "dlmodule.c". (#9093) 2024-06-26 23:25:23 +08:00
zms123456 22b5e5fd7b
[components][ktime]support period ktime timeout and multiple ktimer_hrtimer (#8972)
* support period time

* enable multiple ktimer

* mv set delay_cnt to hrtimer_start

* add ktime debug info

* change current_irq_begin to local var

* fix bug: setting current timer and setting timeout in driver aren't atomicly

* create->init

* refactoring ktime
2024-06-23 22:08:54 +08:00
latercomer d58c29d23e 除了bsp之外的Kconfig使用rsource替代source 2024-06-20 14:40:42 +08:00
zhangyan 842b555358
[bsp/phytium]c++支持,gpio,qspi驱动修改 (#9059)
* GPIO驱动与QSPI驱动适配

* C++支持

* update

---------

Co-authored-by: 张衍 <zhangyan1491@phytium.com.cn>
2024-06-16 15:42:37 +08:00
atwww b421b4e1f4
修复C++11 thread_local对象析构函数与实际内存释放动作顺序相反问题 2024-05-11 13:50:02 -04:00
Shell 2c9b7c10b9
[kernel] add rt_thread_close()
* [thread] Add rt_thread_close()

This patch introduces a new function `rt_thread_close()` to enhances the
usability and maintainability by providing a dedicated mechanism for
closing threads.

- A new function `rt_thread_close()` is added to the API, providing a
  standardized approach for closing threads.
- The `rt_thread_close()` function removes a thread from the thread
  queue, updates its status to indicate closure, and performs the thread
  timer detaching which is a embedded timer in thread object.
- Additionally, the `rt_thread_detach()` function is modified to utilize
  `rt_thread_close()` internally, streamlining the thread detachment
  process.

Signed-off-by: Shell <smokewood@qq.com>
2024-05-01 00:49:09 -04:00
Troy 1d2fde8d73 Add comments for all functions in components/libc/posix/ipc/mqueue.c 2024-04-30 01:08:36 -04:00
Troy 946dd264ed Add comments for all functions in components/libc/posix/io/termios/termios.c 2024-04-26 23:13:27 -04:00
Troy 98a234d430
Add some comments in components/libc/posix/ipc/semaphore.c (#8848) 2024-04-24 05:46:43 +08:00
zms123456 5ca1e45020
[components][drivers]improve ktimer sleep (#8838)
improve ktimer sleep
2024-04-22 11:55:20 +08:00
atwww 2cc88b6cf5
修复POSIX线程本地存储寻找posix线程句柄时的逻辑错误 (#8790)
* Add GCC generalized atomic operation function

* 修复POSIX线程本地存储寻找posix线程句柄时的逻辑错误
2024-04-15 23:13:24 +08:00
Troy 5bb902895c
[libc] add some posix function comments 2024-04-09 18:11:34 -04:00
Meco Man 545155616d [iar] fix legacy macros will be added if cannot get the IAR version 2024-04-06 23:37:32 -04:00
Troy 3a4db99104
[libc][posix/io] add comments 2024-04-01 23:18:15 -04:00
Shell 864055bf18
[fixup] aarch64 UMP compiler error (#8677)
Signed-off-by: Shell <smokewood@qq.com>
2024-03-30 17:58:38 +08:00
Troy 7e492fc37c Add comments for all functions in components/libc/posix/io/eventfd/eventfd.c 2024-03-28 21:28:46 -04:00
Shell 83e95bdff4
sync smart & dfs (#8672)
Signed-off-by: xqyjlj <xqyjlj@126.com>
Signed-off-by: Shell <smokewood@qq.com>
Co-authored-by: xqyjlj <xqyjlj@126.com>
2024-03-28 23:42:56 +08:00
Troy 56fd6984ac Fix the issue of incorrect return of invalid parameters in aio_write 2024-03-27 22:58:54 -04:00
Troy 51d4a9c804 Fix epoll.c file format error 2024-03-26 17:42:01 -04:00
Troy 9fc7c7569b Fix incorrect naming of triggered 2024-03-26 17:42:01 -04:00
Troy 46d6036c28 modified: components/libc/posix/io/aio/aio.c Added some function comments
modified:   components/libc/posix/io/aio/aio.h		Align comments within the aiocb structure
modified:   components/libc/posix/io/epoll/epoll.c	Add comments for all functions and members within structure members
2024-03-26 17:42:01 -04:00
Troy b228f67385 modified: components/libc/posix/delay/delay.c Added comments for all functions in this file
modified:   components/libc/posix/signal/posix_signal.c		Add comments to the sigqueue function, although it does not have an internal implementation
modified:   components/libc/posix/signal/posix_signal.h		Added detailed explanation to all members of the rt_signal_value enumeration
2024-03-25 18:36:17 -04:00
Wat cb6d451564 Add GCC generalized atomic operation function 2024-03-24 23:01:11 -04:00
Shell 71560bafb5
🎯 Sync smart & scheduler codes (#8537)
Signed-off-by: Shell <smokewood@qq.com>
Co-authored-by: xqyjlj <xqyjlj@126.com>
2024-02-23 17:49:15 +08:00
rcitachi 0c96b26c23
[sys_bind] [signalfd] update (#8507) 2024-01-26 22:14:02 +08:00
Meco Man 6cc63626d7 fix some -Wmissing-prototypes warnings 2024-01-02 21:25:26 +08:00
Meco Man 045a49603e [libc] fix undefined warning of rt_memset 2023-12-28 17:47:59 +08:00
Meco Man f06b0894c4 [libc][picolibc] fix llvm compling warning
/home/runner/work/rt-thread/rt-thread/components/libc/compilers/picolibc/syscall.c:24:16: warning: returning 'volatile int *' from a function with result type 'int *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
        return &__pico_errno;
               ^~~~~~~~~~~~~
/home/runner/work/rt-thread/rt-thread/components/libc/compilers/picolibc/syscall.c:30:16: warning: returning 'volatile int *' from a function with result type 'int *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
        return &__pico_errno;
               ^~~~~~~~~~~~~
/home/runner/work/rt-thread/rt-thread/components/libc/compilers/picolibc/syscall.c:33:12: warning: incompatible pointer types returning 'rt_err_t *' (aka 'long *') from a function with result type 'int *' [-Wincompatible-pointer-types]
    return &tid->error;
2023-12-25 23:24:30 +08:00
zmq810150896 cdad0c254a
Update epoll and timerfd (#8330) 2023-12-21 11:17:59 +08:00
zmq810150896 833b43dbc7
[libc][Kconfig] default open epoll/eventfd/signalfd/timerfd/select (#8386) 2023-12-21 01:00:26 +08:00
geniusgogo 0b6402f3cb
update libc (#8335) 2023-12-10 06:49:24 +08:00
zmq810150896 2790ce5357
Updated issues related to uds capacity and eventfd macro redefinition (#8329) 2023-12-06 13:51:13 +08:00
Meco Man 005828eba7 [nano] rt-thread susport nano option 2023-11-30 11:39:34 +08:00
rcitachi c06f4e98fc
[SAL] Update SAL,Add socketpair sendmsg recvmsg function (#8293) 2023-11-28 13:56:06 +08:00
Meco Man 873fd76b2f [libc] add RT_USING_INTERNAL_LIBC_ONLY macro
This option is for RT-Thread Nano version.
If select this option, it will not compile components/libc
folder and only use tool chain internal libc. Normally, the
tool chain internal is only cover ISO standard (e.g. armcc),
but some tool chains' internal libc will cover more than
ISO standard (e.g. newlib).
2023-11-21 23:22:55 -05:00
Meco Man 2324794825 [libc] add comment for RT_USING_EXTERNAL_LIBC 2023-11-20 06:26:48 -05:00
guozhanxin c9a63df925 [fix] sal build error. 2023-11-16 16:25:37 +08:00
guozhanxin 3143289486 [libc] update ctime.c compatible with old drivers 2023-11-16 13:09:32 +08:00
Xiang.Lin da55491608
[libc][picolibc] improve gcc picolibc support 2023-11-08 02:09:09 -05:00
shu-qian c7e0a96f6f
[libc] add comments to the cstdlib.c (#8209)
Co-authored-by: sq <1838545301@qq.com>
2023-11-01 05:31:57 -04:00
kk 1d3fc71c79
[libc] [ctime] fix rt_timespec_to_tick fun internal data overflow (#8198) 2023-10-31 08:59:01 -04:00
Shell eafb04e011
[ctime] fixup of data racing (#8187)
Signed-off-by: Shell <smokewood@qq.com>
2023-10-26 13:56:27 +08:00
xqyjlj 3283f54c7a
🎈 perf: perf rt_hw_interrupt_disable/enable (#8042)
Signed-off-by: Shell <smokewood@qq.com>
Co-authored-by: Shell <smokewood@qq.com>
2023-10-25 20:31:25 +08:00
梁生 0f5334586a
[libc][time]修复MDK编译环境下difftime()函数多重定义的问题 (#8174) 2023-10-24 09:12:10 -04:00