<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rt-thread.git/components/libc/posix, branch copilot/refactor-hwtimer-ktime-cputime-again</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/rt-thread.git/atom/components/libc/posix?h=copilot%2Frefactor-hwtimer-ktime-cputime-again</id>
<link rel='self' href='http://cgit.235523.xyz/rt-thread.git/atom/components/libc/posix?h=copilot%2Frefactor-hwtimer-ktime-cputime-again'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/'/>
<updated>2025-12-18T05:57:07Z</updated>
<entry>
<title>[components][libc][posix][libdl] Optimization: Redundant calculations in a for loop</title>
<updated>2025-12-18T05:57:07Z</updated>
<author>
<name>laidene</name>
<email>228526434@qq.com</email>
</author>
<published>2025-12-15T06:04:50Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=d09135f76b1de9c170c6ccd69cd7aa5bc86957b1'/>
<id>urn:sha1:d09135f76b1de9c170c6ccd69cd7aa5bc86957b1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[LIBC/AIO] Set the AIO work stack size default.</title>
<updated>2025-12-02T01:50:52Z</updated>
<author>
<name>GuEe-GUI</name>
<email>2991707448@qq.com</email>
</author>
<published>2025-12-01T08:05:48Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=39a52cdad22b55268047ebbf96d762c6c5e6c270'/>
<id>urn:sha1:39a52cdad22b55268047ebbf96d762c6c5e6c270</id>
<content type='text'>
Signed-off-by: GuEe-GUI &lt;2991707448@qq.com&gt;
</content>
</entry>
<entry>
<title>Reorganize Group names in build system for clarity and IDE integration #10923</title>
<updated>2025-11-16T03:40:53Z</updated>
<author>
<name>Copilot</name>
<email>198982749+Copilot@users.noreply.github.com</email>
</author>
<published>2025-11-16T03:40:53Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=30e1e5e9dcdaff17258edf70b9f9783e08356288'/>
<id>urn:sha1:30e1e5e9dcdaff17258edf70b9f9783e08356288</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix(stdio): ensure compatibility with newlib &lt;3.4.0 by handling removed __sdidinit (#10791)</title>
<updated>2025-10-13T03:45:22Z</updated>
<author>
<name>loremmoqi</name>
<email>112531644+loremmoqi@users.noreply.github.com</email>
</author>
<published>2025-10-13T03:45:22Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=17a796af24f4c053f4137100f2c9a381efed4cee'/>
<id>urn:sha1:17a796af24f4c053f4137100f2c9a381efed4cee</id>
<content type='text'>
</content>
</entry>
<entry>
<title>RT_TIMER_CTRL_SET_TIME only accept rt_tick_t, pass rt_tick_t instead int/rt_int32_t</title>
<updated>2025-09-24T10:12:36Z</updated>
<author>
<name>Yonggang Luo</name>
<email>luoyonggang@gmail.com</email>
</author>
<published>2025-09-21T17:04:46Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=66b2bcc080b39750cc69a2f00f0d951f94967712'/>
<id>urn:sha1:66b2bcc080b39750cc69a2f00f0d951f94967712</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Trim trailing spaces of components/libc/posix/io/poll/poll.c</title>
<updated>2025-09-24T10:12:36Z</updated>
<author>
<name>Yonggang Luo</name>
<email>luoyonggang@gmail.com</email>
</author>
<published>2025-09-23T05:55:00Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=78dfa1fd9a49db00153e88a6b06bc3d88afab35e'/>
<id>urn:sha1:78dfa1fd9a49db00153e88a6b06bc3d88afab35e</id>
<content type='text'>
Signed-off-by: Yonggang Luo &lt;luoyonggang@gmail.com&gt;
</content>
</entry>
<entry>
<title>[pthreads] Fix pthread_cond_timedwait lacks timeout wakeup</title>
<updated>2025-07-25T07:35:39Z</updated>
<author>
<name>ChenRuiwei</name>
<email>1982833213@qq.com</email>
</author>
<published>2025-07-07T06:35:05Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=f9564d4ee0d9105ca52245d38e6a7ffaea4d7fb9'/>
<id>urn:sha1:f9564d4ee0d9105ca52245d38e6a7ffaea4d7fb9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[components/libc] add comments for some pthread functions. #10423</title>
<updated>2025-07-24T01:36:31Z</updated>
<author>
<name>Codeman-1999</name>
<email>qianzhongxin19@163.com</email>
</author>
<published>2025-07-24T01:36:31Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=7c0fed5d689bc3244a6b83fdcb4cc211b53b06d8'/>
<id>urn:sha1:7c0fed5d689bc3244a6b83fdcb4cc211b53b06d8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix dangling pointer in component pthread and dfs_elm (#9976)</title>
<updated>2025-03-11T02:48:29Z</updated>
<author>
<name>lingfengPeng</name>
<email>uint8_t@163.com</email>
</author>
<published>2025-03-11T02:48:29Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=29a06142c5e7abfeae5d864892490ccc70f6123f'/>
<id>urn:sha1:29a06142c5e7abfeae5d864892490ccc70f6123f</id>
<content type='text'>
* [components/libc/posix][pthreads]fix the risk of dangling pointer

* [components][dfs][dfs_elm]:fix risk of dangling pointer, unmount the temp driver then free the temp FATFS in dfs_elm_mkfs.</content>
</entry>
<entry>
<title>components: libc: fix pointer-to-integer cast warnings and address truncation</title>
<updated>2025-02-22T19:16:00Z</updated>
<author>
<name>kenneth.liu</name>
<email>kenneth.liu@sophgo.com</email>
</author>
<published>2025-02-22T05:20:11Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=4940bb10515316791f1940a59bfeaeebee35ec87'/>
<id>urn:sha1:4940bb10515316791f1940a59bfeaeebee35ec87</id>
<content type='text'>
[Problem Description]
1. When enabling RT_USING_MODULE=y, compilation warnings occur:
   dlelf.c:386:27: warning: cast from pointer to integer of different size
   dlelf.c:398:25: warning: cast from pointer to integer of different size
   dlelf.c:408:24: warning: cast from pointer to integer of different size

2. On RV64 architectures (e.g. Sophgo SG2042 with RISC-V Sv39 and 40-bit physical addressing),
   dlsym may fail when accessing addresses beyond 32-bit range.

[Root Cause]
In dlmodule_load_relocated_object() and dlmodule_symbol_find(),
pointer is cast to rt_uint32_t which truncates:
| rt_ubase_t rodata_addr = (rt_uint32_t)ptr;
This causes:
- Warnings on 64-bit systems (pointer width &gt; 32-bit)
- Actual address truncation on RV64 when physical address exceeds 32-bit

[Solution]
Replace rt_uint32_t with architecture-adaptive rt_ubase_t:
| rt_ubase_t rodata_addr = (rt_ubase_t)ptr;
The rt_ubase_t is defined in include/rttypes.h as:
| #ifdef ARCH_CPU_64BIT
|   typedef rt_uint64_t rt_ubase_t;
| #else
|   typedef rt_uint32_t rt_ubase_t;
| #endif
This ensures correct width casting for both 32/64-bit architectures.

Signed-off-by: Liu Gui &lt;kenneth.liu@sophgo.com&gt;
</content>
</entry>
</feed>
