MCPcopy Create free account
hub / github.com/bendudson/EuraliOS / unique_id

Function unique_id

kernel/src/process.rs:60–66  ·  view source on GitHub ↗

Generate a unique number

()

Source from the content-addressed store, hash-verified

58
59/// Generate a unique number
60pub fn unique_id() -> u64 {
61 interrupts::without_interrupts(|| {
62 let mut counter = UNIQUE_COUNTER.write();
63 *counter += 1;
64 *counter
65 })
66}
67
68/// Per-process state
69struct Process {

Callers 4

new_kernel_threadFunction · 0.85
new_user_threadFunction · 0.85
fork_current_threadFunction · 0.85
allocate_user_stackFunction · 0.85

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected