117 Commits

Author SHA1 Message Date
Adwait Godbole
16e2aa0922 docs: Update Signal Interfaces documentation
Some checks failed
Build Documentation / build-html (push) Has been cancelled
Update the Signal Interfaces documentation to include all
signals with configurable default actions and group them
by behavior for improved readability.

This reflects the current implementation in
sched/signal/sig_default.c.

Signed-off-by: Adwait Godbole <adwaitngodbole@gmail.com>
2026-01-31 10:07:36 -03:00
anjiahao
fea492cf6f libc/spawn:support get/set priority
support get/set priority

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2026-01-26 21:01:01 +08:00
ouyangxiangzhen
fdf3eb0d56 sched/hrtimer: Update the documentation.
This commit updated the documentation for hrtimer.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2026-01-26 16:37:10 +08:00
daichuan
763caabf6d boards/boardctl: Add BOARDIOC_MACADDR command
Add a new boardctl command BOARDIOC_MACADDR to retrieve the MAC address of the network interface.

The board_macaddr function needs to be implemented by the board logic.

Signed-off-by: daichuan <daichuan@xiaomi.com>
2026-01-22 22:13:31 +08:00
hujun5
3129c06390 arch/arm64: disable fork support in protected build mode
Modify ARM64 architecture configuration to disable fork support in protected
build mode (BUILD_PROTECTED). Update ARCH_HAVE_FORK condition from
"!BUILD_KERNEL" to "!BUILD_KERNEL && !BUILD_PROTECTED", ensuring fork is
only available in flat/monolithic builds, not in protected kernel builds.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2026-01-18 11:17:13 +08:00
ouyangxiangzhen
4514a11237 sched/sched: Update the comments and docs.
This commit updated the comments and docs after removing the
nxsched_tick_expiration.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2026-01-13 21:41:35 +08:00
ouyangxiangzhen
dedfc9af1f sched/wdog: Update the documentation.
This commit updated the documentation.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2026-01-13 21:41:35 +08:00
ouyangxiangzhen
b968070829 sched/hrtimer: Update the documentation.
This commit updated the documentation.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2026-01-13 21:41:35 +08:00
wangchengdong
51bcec53c4 nuttx/sched: rename nxsched_timer_expiration
Some checks failed
Build Documentation / build-html (push) Has been cancelled
rename nxsched_timer_expiration to nxsched_tick_expiration
    to align with nxsched_process_tick()

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-01-12 16:20:42 +08:00
wangchengdong
24651af90c [EXPERIMENTAL]sched/hrtimer: update hrtimer document
Update the hrtimer documentation to describe the hrtimer state machine,
    which is introduced to handle safe cancellation and execution in SMP
    environments.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-01-06 23:14:04 +08:00
Luchian Mihai
172dd3959a docs/guides/lwl: move lwl's README.txt to lwl.rst
This PR moves the lwl's READEME.txt file to Documentation/guides/lwl.rst

Signed-off-by: Luchian Mihai <luchiann.mihai@gmail.com>
2025-12-23 15:20:06 +01:00
ouyangxiangzhen
e5db83d7db sched/sched: Remove nxsched_alarm_expiration
This commit removed nxsched_alarm_expiration to simplify the timer
expiration.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-12-22 21:17:13 +08:00
wangchengdong
edf89ddedd sched/hrtimer: add safe synchronous hrtimer cancel API
Add a safe synchronous hrtimer cancel API, hrtimer_cancel_sync().
If the timer callback is currently executing, this function waits
until the callback has completed and the timer state transitions
to HRTIMER_STATE_INACTIVE.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-12-18 18:36:28 +08:00
wangchengdong
d7ce29774c sched/hrtimer: Add motivation to hrtimer module description
Enhance the hrtimer module description by explaining its purpose
and use cases, making it more readable and understandable for humans.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-12-18 18:36:28 +08:00
wangchengdong
506c75069d Documentation: add documentation for the hrtimer module
This commit adds documentation for the hrtimer module, including its
design overview and intended use cases.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-12-18 18:36:28 +08:00
donghaokun
839468f52d docs/sched/sched: Add documentation for different sleep interfaces
Some checks failed
Build Documentation / build-html (push) Has been cancelled
As pull request apache#17200 & apache#17368 introduced support for scheduling sleep, a documentation is needed for different sleep interfaces.
This patch adds the description for sleep interfaces currently provided in NuttX, including Scheduled sleep(nxsched_sleep()...), Signal-scheduled sleep(nxsig_sleep()...), and Busy sleep(up_udelay()).

Signed-off-by: Haokun Dong <donghaokun@lixiang.com>
2025-12-04 18:59:58 +01:00
nuttxs
691cca4153 11_network.rst: Add a "Network Interfaces Overview" section and
reorganize the content structure:

- Add the new "Network Interfaces Overview" section
- Reorganize the document structure and optimize formatting

Signed-off-by: nuttxs <zhaoqing.zhang@sony.com>
2025-11-13 11:29:38 -03:00
wangchengdong
9053b60eb2 Documentation: Add wd_start_next() API description
Some checks failed
Build Documentation / build-html (push) Has been cancelled
Add documentation for wd_start_next() API,
    describing its purpose and usage.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-11-10 23:16:57 +08:00
wangchengdong
61c4c54bd3 Documentation: Add wd_restart_next() API description
Add documentation for the newly introduced wd_restart_next() API,
    describing its purpose and usage.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-11-10 23:16:57 +08:00
wangchengdong
387803e958 Documentation: Add wd_restart() API description
Add documentation for the newly introduced wd_restart() API,
    describing its purpose and usage.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-11-10 23:16:57 +08:00
nuttxs
65e318421d netdb/lib_dnsdelserver.c: support delete the DNS server address
Some checks failed
Build Documentation / build-html (push) Has been cancelled
by index or address

 - dns_del_nameserver()
 - dns_del_nameserver_by_index()

Update the "DNS function" section in 11_network.rst, and create
the netlib API documentation in netlib/index.rst

Signed-off-by: nuttxs <zhaoqing.zhang@sony.com>
2025-11-08 16:17:40 -03:00
wangchengdong
5a6242aac8 Documentation: Remove nxevent_tickwait_wait() description
Some checks failed
Build Documentation / build-html (push) Has been cancelled
Remove the nxevent_tickwait_wait() description from events.rst,
    since this API was removed during the event module refactoring.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-10-31 19:56:32 -03:00
chao an
10fd309452 sched/signal: Remove shadow definitions to reduce unnecessary API
Reduce unnecessary API definitions:

nxsig_waitinfo() -> nxsig_timedwait()

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-10-14 17:40:18 +08:00
wangchengdong
fc09640b28 sched/event: add nxevent_getmask api
Some checks failed
Build Documentation / build-html (push) Has been cancelled
In certain cases, when the event-wait thread is awakened,
  it needs to know the specific mask bit that triggered it,
  so that it can branch to different paths accordingly.
  This patch introduces the nxevent_getmask function to address this requirement.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-09 11:07:49 -03:00
wangchengdong
cac1cc896a sched/event: add nxevent_clear api
Some checks failed
Build Documentation / build-html (push) Has been cancelled
Add nxevent_clear to clear event mask to an event object.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-08 19:48:35 +08:00
wangchengdong
7d0fb9d34f sched/semaphore: add support to customize semaphore max allowed value
Some checks failed
Build Documentation / build-html (push) Has been cancelled
Curernt implementation default semaphore max allowed value to SEM_VALUE_MAX.
  In some cases, user may want to change this, so provide a function to do this: sem_setmaxvalue

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-04 09:48:34 +08:00
wangchengdong
5676bf8227 sched/event: add a new event function nxevent_tickwait_wait
There are cases that users do not want the event wait object to be allocated automatically
  in the stack as a temporary varialbe in nxevent_tickwait, since multiple threads will
  access the varialbe, they want to allocate the object as a global variable for safety
  control or easy debug. To solve this problem, this patch add a new function nxevent_tickwait_wait
  implementation to give user the chance to  pass the global wait object to it.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-04 09:47:50 +08:00
p-szafonimateusz
9fd1478a99 pthread: add pthread_{get|set}concurrency support
Add support for pthread_{get|set}concurrency support.

NuttX uses 1:1 threading model (every pthread is a kernel-managed thread),
so this function has no real effect on the scheduling behavior.

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-08-22 20:50:13 +08:00
p-szafonimateusz
8108aad1a4 pthread: add pthread_attr_{get|set}guardsize support
This commit adds simple implementation of guardsize for pthreads.
At this moment this option simply increases the size of allocated pthread stack.

At default pthread guard size is set to 0.

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-08-22 20:50:13 +08:00
Windsor Schmidt
6bbc8c701a documentation: spelling and grammar fixes
Some checks failed
Build Documentation / build-html (push) Has been cancelled
2025-07-24 14:44:02 +08:00
Morten Fyhn Amundsen
143242776f Documentation: Fix a typo in scheduler docs
Removed a repeated word. Self-explanatory.

Signed-off-by: Morten Fyhn Amundsen <morten.f.amundsen@scoutdi.com>
2025-06-02 23:09:02 +08:00
ouyangxiangzhen
947856efe0 sched/wdog: Add max delay tick limitation.
This commit changed the type of the delay ticks to the unsigned, which can reduce the useless branch conditions
Besides, this commit added max delay tick limitation to fix incorrect timing behavior if we delay SCLOCK_MAX in the SMP build.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-05-27 12:10:39 +02:00
Lars Kruse
57a7cb503a Documentation: fix spelling 2025-05-15 11:33:41 +08:00
Lars Kruse
b333ad3ab5 style: fix typos
Thanks, codespell!
2025-04-30 13:45:46 +08:00
Kerogit
4ad0a5b30a Documentation/reference/user/02_task_scheduling: fixed function name
The document referred to sched_get_rr_interval function but only
sched_rr_get_interval exists in the sources.
2025-04-27 13:07:45 +08:00
chao an
c6591c0f49 driver/serial: remove return value of up_putc()
modify the prototype of up_putc(): remove the return value

The architecture code does not care about the return value of up_putc(), so removing it saves two statements:

Before:                                                    After:
de4c: e52de004  push  {lr}    @ (str lr, [sp, #-4]!)    |  de4c: e52de004  push  {lr}    @ (str lr, [sp, #-4]!)
de50: e24dd014  sub sp, sp, #20                         |  de50: e24dd014  sub sp, sp, #20
de54: e58d0004  str r0, [sp, #4]                        |  de54: e58d0004  str r0, [sp, #4]
de58: e30030f8  movw  r3, #248  @ 0xf8                  |  de58: e30030f8  movw  r3, #248  @ 0xf8
de5c: e3423000  movt  r3, #8192 @ 0x2000                |  de5c: e3423000  movt  r3, #8192 @ 0x2000
de60: e58d300c  str r3, [sp, #12]                       |  de60: e58d300c  str r3, [sp, #12]
de64: e59d1004  ldr r1, [sp, #4]                        |  de64: e59d1004  ldr r1, [sp, #4]
de68: e59d000c  ldr r0, [sp, #12]                       |  de68: e59d000c  ldr r0, [sp, #12]
de6c: ebfffe66  bl  d80c <pl011_putc>                   |  de6c: ebfffe66  bl  d80c <pl011_putc>
de70: e59d3004  ldr r3, [sp, #4]                        |  de70: e28dd014  add sp, sp, #20
de74: e1a00003  mov r0, r3                              |  de74: e49df004  pop {pc}    @ (ldr pc, [sp], #4)
de78: e28dd014  add sp, sp, #20                         |
de7c: e49df004  pop {pc}    @ (ldr pc, [sp], #4)        |

Signed-off-by: chao an <anchao@lixiang.com>
2024-10-26 13:21:29 +08:00
fangxinyong
f2cc9e8410 fs: support VFS-based named event group
This extension for the event group, to establish a connection between
named event groups and a task. The task may reference the event group
associated with a VFS-based name. Then the event group can be used
in subsequent calls to nxevent_wait() or nxevent_post().

This is an internal OS interface and should not be used by applications.

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2024-10-09 01:40:00 +08:00
Petro Karashchenko
d499ac9d58 nuttx: fix multiple 'FAR', 'CODE' and style issues
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-08-25 19:22:15 +08:00
chao an
75fac7dbc6 sched/nxevent: add support of kernel event group
Events groups are synchronization primitives that allow tasks to wait
for multiple conditions to be met before proceeding. They are particularly
useful in scenarios where a task needs to wait for several events to occur
simultaneously.

Signed-off-by: chao an <anchao@lixiang.com>
2024-08-23 17:00:35 +08:00
Yanfeng Liu
c577abe222 docs/os: fix typos
This fixes a few typos in conventions.rst and libc/index.rst.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-04-21 11:06:46 +08:00
Zhe Weng
da536bed9c Documentation: Move nat.rst and netdev.rst to net/
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-02-23 08:32:49 +01:00
Saurav Pal
93d03d0418 fs: Add VFS docs
This commit adds VFS docmentation, and details about the VFS interface.

Signed-off-by: Saurav Pal <resyfer.dev@gmail.com>
2024-02-20 18:28:09 -08:00
raiden00pl
56cb0450cc Documentation: fix warning 2023-11-08 15:54:54 +08:00
Zhe Weng
6403965075 Documentation: Add netdev description with multiple IPv6 addresses
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-11-07 19:30:36 +08:00
raiden00pl
b7f94fbf22 Documentation: various cosmetic changes 2023-10-30 20:29:54 +08:00
Alan Carvalho de Assis
468e9fcde5 Documentation: Fix typos
I used codespell to find typos in the documentation.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2023-10-29 10:35:51 +08:00
raiden00pl
d72c6802c1 Documentation: add dummy pages for missing filesystems and drivers 2023-10-27 13:21:40 -03:00
Nathan Hartman
5a50800a9f Documentation: Minor fixes in Tickless OS documentation
* Documentation/reference/os/time_clock.rst:
  Add missing Kconfig code-block, found at CWIKI [1].
  Fix some typos.

References:
[1] https://cwiki.apache.org/confluence/display/NUTTX/Tickless+OS
2023-05-24 10:31:56 +08:00
Brennan Ashton
4d3ce8f706 docs: Fix sphinx warnings listed in issue #9306
Fixes these errors:
```
 /home/bashton/nuttx-wrk/nuttx/Documentation/components/drivers/special/lcd.rst:52: WARNING: duplicate label ttgotdisplayesp32, other instance in /home/bashton/nuttx-wrk/nuttx/Documentation/components/drivers/special/framebuffer.rst
 /home/bashton/nuttx-wrk/nuttx/Documentation/platforms/sim/sim/boards/sim/index.rst:370: CRITICAL: Unexpected section title.
 /home/bashton/nuttx-wrk/nuttx/Documentation/platforms/sim/sim/boards/sim/index.rst:394: CRITICAL: Unexpected section title.
 /home/bashton/nuttx-wrk/nuttx/Documentation/platforms/sim/sim/boards/sim/index.rst:1494: ERROR: Inconsistent literal block quoting.
 /home/bashton/nuttx-wrk/nuttx/Documentation/platforms/sim/sim/boards/sim/index.rst:1569: WARNING: Literal block expected; none found.
 /home/bashton/nuttx-wrk/nuttx/Documentation/platforms/xtensa/esp32s2/boards/esp32s2-kaluga-1/index.rst:207: WARNING: download file not readable: /home/bashton/nuttx-wrk/nuttx/Documentation/platforms/xtensa/esp32s2/boards/esp32s2-kaluga-1/tone.wav
 checking consistency... /home/bashton/nuttx-wrk/nuttx/Documentation/reference/os/newreno.rst: WARNING: document isn't included in any toctree
 /home/bashton/nuttx-wrk/nuttx/Documentation/guides/zerolatencyinterrupts.rst:117: WARNING: unknown document: <nestedinterrupts.rst>
```
2023-05-20 12:40:52 +08:00
hujun5
81bdb97536 libc/misc: add fdsan api doc
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-05-17 10:24:42 +08:00