Function to extract a reference with static lifetime Mutex lock returns a MutexGuard, which dereferences to a reference with a lifetime tied to the mutex lock. This function casts the reference to have 'static lifetime which Descriptor::tss_segment expects. Note: Should not be used except in setting the TSS in the GDT
()
| 69 | /// Note: Should not be used except in setting the TSS in the GDT |
| 70 | /// |
| 71 | unsafe fn tss_reference() -> &'static TaskStateSegment { |
| 72 | let tss_ptr = &*TSS.lock() as *const TaskStateSegment; |
| 73 | & *tss_ptr |
| 74 | } |
| 75 | |
| 76 | pub fn tss_address() -> u64 { |
| 77 | let tss_ptr = &*TSS.lock() as *const TaskStateSegment; |
nothing calls this directly
no outgoing calls
no test coverage detected