Skip to content

Commit

Permalink
add some docs
Browse files Browse the repository at this point in the history
  • Loading branch information
AuYang261 committed Sep 13, 2023
1 parent 3def120 commit bccb528
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/axtask/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ cfg_if::cfg_if! {
mod task;
mod api;
mod wait_queue;
/// load average
pub mod loadavg;

#[cfg(feature = "irq")]
Expand Down
1 change: 1 addition & 0 deletions modules/axtask/src/loadavg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ static mut LAST_UPDATE: AtomicU64 = AtomicU64::new(0);
// TODO: if irq is disabled, what value should AVENRUN be?
static mut AVENRUN: [u64; 3] = [0, 0, 0];

/// Get the load average
pub fn get_avenrun(loads: &mut [u64; 3]) {
for i in 0..3 {
unsafe {
Expand Down

0 comments on commit bccb528

Please sign in to comment.