MCPcopy Create free account
hub / github.com/Starry-OS/StarryOS / futex_table_for

Method futex_table_for

core/src/task.rs:279–290  ·  view source on GitHub ↗

Returns the futex table for the given key.

(&self, key: &FutexKey)

Source from the content-addressed store, hash-verified

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 {

Callers 3

handle_futex_deathFunction · 0.80
do_exitFunction · 0.80
sys_futexFunction · 0.80

Calls 1

get_or_insertMethod · 0.45

Tested by

no test coverage detected