Returns the futex table for the given key.
(&self, key: &FutexKey)
| 277 | |
| 278 | /// Returns the futex table for the given key. |
| 279 | pub fn futex_table_for(&self, key: &FutexKey) -> Arc<FutexTable> { |
| 280 | match key { |
| 281 | FutexKey::Private { .. } => self.futex_table.clone(), |
| 282 | FutexKey::Shared { region, .. } => { |
| 283 | let ptr = match region { |
| 284 | Ok(pages) => Weak::as_ptr(pages) as usize, |
| 285 | Err(key) => Weak::as_ptr(key) as usize, |
| 286 | }; |
| 287 | SHARED_FUTEX_TABLES.lock().get_or_insert(ptr) |
| 288 | } |
| 289 | } |
| 290 | } |
| 291 | |
| 292 | /// Get the umask. |
| 293 | pub fn umask(&self) -> u32 { |
no test coverage detected