Unverified Commit a450addd authored by zyno42's avatar zyno42
Browse files

Modify libtapasco to allow explicit waiting for PE

This is useful for measuring the communication overhead of a PE.
parent 70cbbb92
......@@ -286,6 +286,15 @@ impl Job {
Ok(unused_mem)
}
/// Just wait for a PE's completion. Useful for measuring execution time.
pub fn wait_for_completion(&mut self) -> Result<()> {
if self.pe.is_some() {
self.pe.as_mut().unwrap().wait_for_completion().context(PEError)
} else {
Err(Error::NoPEtoRelease {})
}
}
/// Wait for job completion and handle copy back if necessary.
///
/// # Arguments
......
......@@ -170,7 +170,7 @@ impl PE {
}
/// Waits for a PE interrupt and deactivates the PE afterwards
fn wait_for_completion(&mut self) -> Result<()> {
pub fn wait_for_completion(&mut self) -> Result<()> {
if self.active {
self.interrupt
.wait_for_interrupt()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment