Skip to main content

ccp_test_utils/
pinning.rs

1use ccp_shared::types::LogicalCoreId;
2use cpu_utils::pinning::ThreadPinner;
3
4pub const DUMMY: DummyThreadPinner = DummyThreadPinner {};
5
6pub struct DummyThreadPinner;
7
8impl ThreadPinner for DummyThreadPinner {
9    #[inline]
10    fn pin_current_thread_to(&self, _core_id: LogicalCoreId) -> bool {
11        true
12    }
13
14    #[inline]
15    fn pin_current_thread_to_cpuset(&self, _core_ids: &[LogicalCoreId]) -> bool {
16        true
17    }
18}