mu_lib 0.2.2

XCENA mu Library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Task module providing task management functionality
//!
//! This module provides functions to retrieve the index of the currently running task.

pub use crate::bindings::root::getTaskIdxRB;

/// Function to get the index of the currently running task
///
/// # Returns
/// * `u32` - The index of the current task
///
/// # Examples
/// ```
/// let task_idx = get_task_idx();
/// ```
pub fn get_task_idx() -> u32 {
    unsafe { getTaskIdxRB() }
}