diff options
author | Daniel Verkamp <dverkamp@chromium.org> | 2019-05-02 16:41:53 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-05-08 19:35:15 -0700 |
commit | 82c0b1d72115b0560ce9ad2f3843dea3a29d6c1e (patch) | |
tree | bff741cb1422e916ffd2a9e26a5efe82045c64ad /devices/src/usb | |
parent | bbd24c5a83014807c8c03aac93d06e9f7d81181c (diff) | |
download | crosvm-82c0b1d72115b0560ce9ad2f3843dea3a29d6c1e.tar crosvm-82c0b1d72115b0560ce9ad2f3843dea3a29d6c1e.tar.gz crosvm-82c0b1d72115b0560ce9ad2f3843dea3a29d6c1e.tar.bz2 crosvm-82c0b1d72115b0560ce9ad2f3843dea3a29d6c1e.tar.lz crosvm-82c0b1d72115b0560ce9ad2f3843dea3a29d6c1e.tar.xz crosvm-82c0b1d72115b0560ce9ad2f3843dea3a29d6c1e.tar.zst crosvm-82c0b1d72115b0560ce9ad2f3843dea3a29d6c1e.zip |
usb: set event loop thread name
Set the name of the thread created to run the Xhci controller event loop so that it can be identified more easily in a debugger. BUG=None TEST=Attach to running crosvm with gdb and verify 'info threads' name Change-Id: Id73a580b35231ec7fa7aec5bd51027d32e483bff Signed-off-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1594192 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Zach Reizner <zachr@chromium.org>
Diffstat (limited to 'devices/src/usb')
-rw-r--r-- | devices/src/usb/xhci/ring_buffer_controller.rs | 2 | ||||
-rw-r--r-- | devices/src/usb/xhci/xhci.rs | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/devices/src/usb/xhci/ring_buffer_controller.rs b/devices/src/usb/xhci/ring_buffer_controller.rs index 5084fab..201441a 100644 --- a/devices/src/usb/xhci/ring_buffer_controller.rs +++ b/devices/src/usb/xhci/ring_buffer_controller.rs @@ -320,7 +320,7 @@ mod tests { fn test_ring_buffer_controller() { let (tx, rx) = channel(); let mem = setup_mem(); - let (l, j) = EventLoop::start(None).unwrap(); + let (l, j) = EventLoop::start("test".to_string(), None).unwrap(); let l = Arc::new(l); let controller = RingBufferController::new_with_handler( "".to_string(), diff --git a/devices/src/usb/xhci/xhci.rs b/devices/src/usb/xhci/xhci.rs index df57e68..55dd50e 100644 --- a/devices/src/usb/xhci/xhci.rs +++ b/devices/src/usb/xhci/xhci.rs @@ -83,7 +83,8 @@ impl Xhci { regs: XhciRegs, ) -> Result<Arc<Self>> { let (event_loop, _join_handle) = - EventLoop::start(Some(fail_handle.clone())).map_err(Error::StartEventLoop)?; + EventLoop::start("xhci".to_string(), Some(fail_handle.clone())) + .map_err(Error::StartEventLoop)?; let interrupter = Arc::new(Mutex::new(Interrupter::new(mem.clone(), irq_evt, ®s))); let event_loop = Arc::new(event_loop); let intr_resample_handler = |