Skip to content
This repository was archived by the owner on Jul 6, 2019. It is now read-only.

Commit 5dadda6

Browse files
committed
Added docs to os::sched::task
1 parent 4579253 commit 5dadda6

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/os/sched/task.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,36 @@
1313
// See the License for the specific language governing permissions and
1414
// limitations under the License.
1515

16+
/// Task structures.
17+
1618
use core::kinds::marker;
1719

20+
/// Task states.
1821
pub enum State {
22+
/// This task can be scheduled.
1923
Runnable
2024
}
2125

26+
/// Task descriptor. Should be treated as opaque struct.
2227
pub struct Task {
28+
/// Current task state.
2329
pub state: State,
30+
31+
/// Pointer to top of the stack.
2432
pub stack_start: u32,
33+
34+
/// Pointer to the lowest possible stack address.
2535
pub stack_end: u32,
2636
}
2737

38+
/// Tasks index provides a scheduler with a list of all registered tasks and
39+
/// initial state.
2840
#[packed]
2941
pub struct TasksIndex<'a> {
42+
/// A mutabler slice with all defined tasks.
3043
pub tasks: &'a mut [Task],
44+
45+
/// Current running task index.
3146
pub current_task_index: u8,
3247

3348
pub no_copy: marker::NoCopy,

0 commit comments

Comments
 (0)