This patch fixes formatting error in desription of High Resolution Timer.
Using indentation to (presumably) align non-bold text right of the bold
text did not have the desired effect, instead the line was split into two
and the second line was handled as an indented paragraph.
Signed-off-by: Kerogit <kr.git@kerogit.eu>
rename nxsched_timer_expiration to nxsched_tick_expiration
to align with nxsched_process_tick()
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
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>
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>
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>
This commit adds documentation for the hrtimer module, including its
design overview and intended use cases.
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
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>
Add documentation for the newly introduced wd_restart_next() API,
describing its purpose and usage.
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Add documentation for the newly introduced wd_restart() API,
describing its purpose and usage.
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
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>
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>
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>
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>
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>
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>
- NewReno congestion control algorithm is used to solve the problem
of network congestion breakdown. NewReno congestion control includes
slow start, collision avoidance, fast retransmission, and fast
recovery. The implementation refers to RFC6582 and RFC5681.
- In addition, we optimize the congestion algorithm. In the conflict
avoidance stage, the maximum congestion window max_cwnd is used to
limit the excessive growth of cwnd and prevent network jitter
caused by congestion. Maximum congestion window max_cwnd is updated
with the current congestion window cwnd and the update weight is
0.875 when an RTO timeout occurs.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
The function is not relevant any longer, remove it. Also remove
save_addrenv_t, the parameter taken by up_addrenv_restore.
Implement addrenv_select() / addrenv_restore() to handle the temporary
instantiation of address environments, e.g. when a process is being
created.
This is preparation for moving address environments out of the group
structure into the tcb.
Why move ? Because the group is destroyed very early in the exit phase,
but the MMU mappings are needed until the context switch to the next
process is complete. Otherwise the MMU will lose its mappings and the
system will crash.