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

Method give_rendezvous

kernel/src/process.rs:228–243  ·  view source on GitHub ↗

Add a rendezvous to the process, returning the handle

(&self, rendezvous: Arc<RwLock<Rendezvous>>)

Source from the content-addressed store, hash-verified

226
227 /// Add a rendezvous to the process, returning the handle
228 pub fn give_rendezvous(&self, rendezvous: Arc<RwLock<Rendezvous>>) -> usize {
229 // Lock the handles
230 let handles = &mut self.process.write().handles;
231
232 // Find empty handle slot
233 for (pos, handle) in handles.iter().enumerate() {
234 if handle.is_none() {
235 // Found empty slot => Store rendezvous
236 handles[pos] = Some(rendezvous);
237 return pos;
238 }
239 }
240 // All full => Add new handle
241 handles.push(Some(rendezvous));
242 handles.len() - 1
243 }
244
245 /// Get the physical address and page table level of the memory
246 /// chunk containing the given virtual address

Callers 3

new_rendezvousFunction · 0.80
sys_copy_rendezvousFunction · 0.80
to_valuesMethod · 0.80

Calls 4

iterMethod · 0.80
writeMethod · 0.45
pushMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected