Skip to content

Commit

Permalink
Added delete method for Tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
Neo-Zhixing committed Nov 11, 2020
1 parent d52f8b8 commit 612da12
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,12 @@ impl Task {
freertos_rs_get_stack_high_water_mark(self.task_handle) as u32
}
}

pub fn delete(&mut self) {
unsafe {
freertos_rs_delete_task(self.task_handle as *const _);
}
}
}

/// Helper methods to be performed on the task that is currently executing.
Expand Down

0 comments on commit 612da12

Please sign in to comment.