Update translated documentation (#1625)
This commit is contained in:
parent
13df67a5c0
commit
1fc484202d
|
|
@ -360,12 +360,15 @@
|
|||
"hash": "7193f93fd9af38c8b7d2ad0ad9453ce5"
|
||||
},
|
||||
"en:kernel/interrupt/index.rst": {
|
||||
"hash": "13d79d4b53fd664cf72b95b279efcb75"
|
||||
"hash": "5a42df4211e7c59aba311c9523bd529d"
|
||||
},
|
||||
"en:kernel/interrupt/workqueue.md": {
|
||||
"hash": "930d4d0eefeb4c4f01ec2a93a2a1b9ad"
|
||||
},
|
||||
"en:kernel/net/napi_and_netns_poll.md": {
|
||||
"hash": "04ae3378b43189a4e61226612f66f9ab"
|
||||
},
|
||||
"en:kernel/interrupt/tasklet.md": {
|
||||
"hash": "254da75179ebb9f39cd9b562486fb122"
|
||||
}
|
||||
}
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
- Source document: kernel/interrupt/index.rst
|
||||
|
||||
- Translation time: 2026-01-05 16:07:55
|
||||
- Translation time: 2026-01-09 06:34:03
|
||||
|
||||
- Translation model: `hunyuan-turbos-latest`
|
||||
|
||||
|
|
@ -20,4 +20,5 @@ This is the design document related to interrupt handling and bottom half mechan
|
|||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
tasklet
|
||||
workqueue
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
:::{note}
|
||||
**AI Translation Notice**
|
||||
|
||||
This document was automatically translated by `hunyuan-turbos-latest` model, for reference only.
|
||||
|
||||
- Source document: kernel/interrupt/tasklet.md
|
||||
|
||||
- Translation time: 2026-01-09 06:34:08
|
||||
|
||||
- Translation model: `hunyuan-turbos-latest`
|
||||
|
||||
Please report issues via [Community Channel](https://github.com/DragonOS-Community/DragonOS/issues)
|
||||
|
||||
:::
|
||||
|
||||
## Tasklet
|
||||
|
||||
A tasklet is a bottom-half mechanism based on softirq, used to execute lightweight, non-sleepable callback logic within a softirq context.
|
||||
|
||||
### Semantic Highlights
|
||||
|
||||
- Can be scheduled in hardirq/softirq/task context.
|
||||
- Only one instance of the same tasklet can execute at a time (self-serializing).
|
||||
- Repeated scheduling is deduplicated and will not enqueue indefinitely.
|
||||
- Callbacks run in a softirq context, where sleeping is not allowed.
|
||||
|
||||
### Data Passing
|
||||
|
||||
The tasklet callback is abstracted through the `TaskletFunc` trait, with an equivalent function signature:
|
||||
|
||||
```rust
|
||||
fn(usize, Option<Arc<dyn TaskletData>>)
|
||||
```
|
||||
|
||||
- `usize` is suitable for simple values or indices.
|
||||
- `Option<Arc<dyn TaskletData>>` is suitable for complex data that requires safe sharing.
|
||||
|
||||
`TaskletData` is constrained to `Send + Sync`, and is safely shared via `Arc` to avoid passing raw pointers.
|
||||
Loading…
Reference in New Issue