<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rt-thread.git/src/scheduler_mp.c, branch copilot/fix-riscv-none-job-failure</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/rt-thread.git/atom/src/scheduler_mp.c?h=copilot%2Ffix-riscv-none-job-failure</id>
<link rel='self' href='http://cgit.235523.xyz/rt-thread.git/atom/src/scheduler_mp.c?h=copilot%2Ffix-riscv-none-job-failure'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/'/>
<updated>2025-09-30T02:25:08Z</updated>
<entry>
<title>doxygen: cleanup code for group_thread_management</title>
<updated>2025-09-30T02:25:08Z</updated>
<author>
<name>Chen Wang</name>
<email>unicorn_wang@outlook.com</email>
</author>
<published>2025-09-29T08:43:04Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=3dd4f71bb6bd546757f591e1ed61e8b96ae95352'/>
<id>urn:sha1:3dd4f71bb6bd546757f591e1ed61e8b96ae95352</id>
<content type='text'>
The cleanup involved three parts:

- Merging the standalone "/**@{*/" into
  "@addtogroup group_thread_management"

- Changing "/**@}*/" to "/** @} group_thread_management */",
  adding the group name makes it easier to find the matching "@{" part.

- Deleting the "@addtogroup" directive in "include/rtthread.h"
  because this header file doesn't have doxygen comments.
  All doxygen comments for function bodies are defined in other .c files.

  Note, we remian two doxygen comments for rt_thread_inited_hookproto_t
  and rt_thread_idle_sethook in the "include/rtthread.h".
  rt_thread_inited_hookproto_t is really defined here.
  For rt_thread_idle_sethook, please see FIXME comment for reason.

Signed-off-by: Chen Wang &lt;unicorn_wang@outlook.com&gt;
</content>
</entry>
<entry>
<title>doxygen: fixed duplicated comments for scheduler APIs</title>
<updated>2025-09-09T10:20:41Z</updated>
<author>
<name>Chen Wang</name>
<email>unicorn_wang@outlook.com</email>
</author>
<published>2025-09-09T03:12:04Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=1034e5b4fd09ac65985bd48b03071835dc9c9c7d'/>
<id>urn:sha1:1034e5b4fd09ac65985bd48b03071835dc9c9c7d</id>
<content type='text'>
Similar to PR #10674, `src/scheduler_mp.c` and
`src/scheduler_up.c` also have similar issues.

After investigation, we found: in commit 2c98ce4605
"[HUST CSE][document] Fix some comments, invalid
grouping commands and warnings in Doxygen." This patch
excluded `src/scheduler_mp.c` and `src/scheduler_up.c`
from the Doxygen build and include
`documentation/doxygen/thread.h` (the new file path
after adjustment is `documentation/0.doxygen/core/thread.h`),
placing the Doxygen comments for some functions in this file.

However, this approach has its problems:

- The comments in `documentation/0.doxygen/core/thread.h`
  are separated from the source code, making them
  difficult to maintain. This also results in the
  comments for the newly added functions in
  `src/scheduler_mp.c` and `src/scheduler_up.c` not
  being updated in a timely manner and failing to
  be compiled into Doxygen (becoming HTML).

- For the average programmer, it's unlikely that
  they'll consider the `documentation/0.doxygen/`
  directory for function declarations and comments,
  let alone the need to maintain the Doxygen comments
  in that directory. Currently, the header files under
  `documentation/0.doxygen/` should strictly be used
  only to define Doxygen groups and should not include
  Doxygen comments for the code itself. (Similar
  issues exist in documentation/0.doxygen/3.hardware.h
  and documentation/0.doxygen/core/systeminit.h, which
  require further cleanup.)

The solution is similar to PR #10674, where only MP
documentation is generated by default. For functions
defined in MP but not in UP, we use the "@note"
directive in the function's doxygen comment to indicate
whether the function is supported in both UP and MP,
or only in MP.

After implementing this solution, the file
`documentation/0.doxygen/core/thread.h` can be deleted.

Signed-off-by: Chen Wang &lt;unicorn_wang@outlook.com&gt;
</content>
</entry>
<entry>
<title>doxygen: group name all in lowcase</title>
<updated>2025-06-25T06:02:28Z</updated>
<author>
<name>Chen Wang</name>
<email>unicorn_wang@outlook.com</email>
</author>
<published>2025-06-24T08:11:28Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=8e9872a55456b38d28b0d7d076905be84d0af7a2'/>
<id>urn:sha1:8e9872a55456b38d28b0d7d076905be84d0af7a2</id>
<content type='text'>
This patch only updated the groups defined in documentation/0.doxygen.

Other groups will be moved into documentation/0.doxygen and updated at
that time.

Signed-off-by: Chen Wang &lt;unicorn_wang@outlook.com&gt;
</content>
</entry>
<entry>
<title>[kernel]add doxygen comments for scheduler. (#10366)</title>
<updated>2025-06-08T07:03:26Z</updated>
<author>
<name>Guorui Li</name>
<email>liguorui1213@163.com</email>
</author>
<published>2025-06-08T07:03:26Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=f5bff56c5b58d102d8765e384a900be91b69cb7a'/>
<id>urn:sha1:f5bff56c5b58d102d8765e384a900be91b69cb7a</id>
<content type='text'>
* [kernel]add doxygen comments for scheduler.

* [kernel]fix spell error in comments.</content>
</entry>
<entry>
<title>doxygen: add prefix for groups (#9991)</title>
<updated>2025-02-15T04:15:19Z</updated>
<author>
<name>Chen Wang</name>
<email>unicorn_wang@outlook.com</email>
</author>
<published>2025-02-15T04:15:19Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=c40b79037ce8bb09ba95411ebee1b22631cf9027'/>
<id>urn:sha1:c40b79037ce8bb09ba95411ebee1b22631cf9027</id>
<content type='text'>
* doxygen: add prefix for groups

Add "group_" prefix to doxygen group names. This makes
it easier to grep with group name later.

This patch only modifies the groups defined in the pathes
of INPUT of documentation/Doxyfile:

INPUT = . \
        ../src \
        ../include \
        ../components/finsh \
        ../components/drivers/include/drivers \
        ../components/drivers/clk \
        ../components/dfs/dfs_v2/src \
        ../components/dfs/dfs_v2/include

Other groups are not touched.

Signed-off-by: Chen Wang &lt;unicorn_wang@outlook.com&gt;

* ci: fixed error report when run file_check.py

Such as:
- "please delete extra space at the end of this line."
- "the RT-Thread error code should return negative value. e.g. return
  -RT_ERROR"

Signed-off-by: Chen Wang &lt;unicorn_wang@outlook.com&gt;

---------

Signed-off-by: Chen Wang &lt;unicorn_wang@outlook.com&gt;</content>
</entry>
<entry>
<title>feat: arm64: update thread self on sp-switch</title>
<updated>2024-10-11T04:09:01Z</updated>
<author>
<name>Shell</name>
<email>smokewood@qq.com</email>
</author>
<published>2024-09-25T02:28:38Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=5796e0d646b9fa97e14065859f308b2f5553cc12'/>
<id>urn:sha1:5796e0d646b9fa97e14065859f308b2f5553cc12</id>
<content type='text'>
This patch improves the atomicity of context switching by ensuring that
the stack pointer (sp) and thread self updates occur simultaneously.
This enhancement is crucial for maintaining thread safety and
preventing potential inconsistencies during context switches.

Changes:
- Modified `cpuport.h` to use `ARM64_THREAD_REG` for thread self access.
- Added an `update_tidr` macro in `context_gcc.S` to streamline thread ID
  updates.
- Adjusted `rt_hw_context_switch_to` and `rt_hw_context_switch` to call
  `update_tidr`, ensuring atomic updates during context switches.
- Cleaned up `scheduler_mp.c` by removing redundant thread self
  assignments.

Signed-off-by: Shell &lt;smokewood@qq.com&gt;
</content>
</entry>
<entry>
<title>[arm64] add hw thread self (#8942)</title>
<updated>2024-05-28T06:27:55Z</updated>
<author>
<name>Shell</name>
<email>smokewood@qq.com</email>
</author>
<published>2024-05-28T06:27:55Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=f17f994f8c85a0ca58d42c81a14f1134af6ada91'/>
<id>urn:sha1:f17f994f8c85a0ca58d42c81a14f1134af6ada91</id>
<content type='text'>
* [libcpu] arm64: Add hardware thread_self support

This patch introduces hardware-based thread self-identification
for the AArch64 architecture. It optimizes thread management by
using hardware registers to store and access the current thread's
pointer, reducing overhead and improving overall performance.

Changes include:
- Added `ARCH_USING_HW_THREAD_SELF` configuration option.
- Modified `rtdef.h`, `rtsched.h` to conditionally include
  `critical_switch_flag` based on the new config.
- Updated context management in `context_gcc.S`, `cpuport.h`
  to support hardware-based thread self.
- Enhanced `scheduler_mp.c` and `thread.c` to leverage the new
  hardware thread self feature.

These modifications ensure better scheduling and thread handling,
particularly in multi-core environments, by minimizing the
software overhead associated with thread management.

Signed-off-by: Shell &lt;smokewood@qq.com&gt;

* fixup: address suggestion

* fixup: rt_current_thread as global

* scheduler: add cpu object for UP scheduler

Also, maintain the rt_current_thread in cpu object on UP scheduler.

---------

Signed-off-by: Shell &lt;smokewood@qq.com&gt;</content>
</entry>
<entry>
<title>[libcpu/arm64] add C11 atomic ticket spinlock (#8882)</title>
<updated>2024-05-16T07:45:12Z</updated>
<author>
<name>Shell</name>
<email>smokewood@qq.com</email>
</author>
<published>2024-05-16T07:45:12Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=e25fc8b5118fba87acd5bc677641926a913bb3a5'/>
<id>urn:sha1:e25fc8b5118fba87acd5bc677641926a913bb3a5</id>
<content type='text'>
* [libcpu/arm64] add C11 atomic ticket spinlock

Replace the former implementation of flag-based spinlock which is unfair

Besides, C11 atomic implementation is more readable (it's C anyway),
and maintainable. Cause toolchain can use their builtin optimization and
tune for different micro-architectures. For example armv8.5 introduces a
better instruction. The compiler can help with that when it knows your
target platform in support of it.

Signed-off-by: Shell &lt;smokewood@qq.com&gt;

* fixup: RT_CPUS_NR

---------

Signed-off-by: Shell &lt;smokewood@qq.com&gt;</content>
</entry>
<entry>
<title>[src][thread]bind cpu fixup (#8872)</title>
<updated>2024-04-28T07:19:50Z</updated>
<author>
<name>zms123456</name>
<email>85141075+zmshahaha@users.noreply.github.com</email>
</author>
<published>2024-04-28T07:19:50Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=fa1c473a964a7303e2f80e4fe126a4cadb09336b'/>
<id>urn:sha1:fa1c473a964a7303e2f80e4fe126a4cadb09336b</id>
<content type='text'>
bind cpu fixup</content>
</entry>
<entry>
<title>fixup: add Kconfig option</title>
<updated>2024-04-20T01:30:12Z</updated>
<author>
<name>Shell</name>
<email>smokewood@qq.com</email>
</author>
<published>2024-04-19T05:13:31Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=d1bb01621beec12a03fbe1489419cabde5461919'/>
<id>urn:sha1:d1bb01621beec12a03fbe1489419cabde5461919</id>
<content type='text'>
</content>
</entry>
</feed>
