MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / fetch_robust_entry

Function fetch_robust_entry

source/kernel/kthread.cpp:486–496  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

484// copied/ported from https://cregit.linuxsources.org/code/5.18/kernel/futex/core.c.html
485
486static U32 fetch_robust_entry(KThread* thread, struct k_robust_list_head* entry, U32 headAddress, U32* pi) {
487 *pi = headAddress & 1;
488 headAddress &= ~1;
489 entry->address = headAddress;
490
491 if (!thread->memory->canRead(headAddress, 12)) {
492 return -K_EFAULT;
493 }
494 thread->memory->memcpy(entry, headAddress, 12);
495 return 0;
496}
497
498/* Constants for the pending_op argument of handle_futex_death */
499#define HANDLE_DEATH_PENDING true

Callers 1

exitRobustListMethod · 0.85

Calls 2

memcpyMethod · 0.80
canReadMethod · 0.45

Tested by

no test coverage detected