()
| 373 | /// Called when a frame is exited. |
| 374 | #[cfg(feature = "threading")] |
| 375 | pub fn pop_thread_frame() { |
| 376 | CURRENT_THREAD_SLOT.with(|slot| { |
| 377 | if let Some(s) = slot.borrow().as_ref() { |
| 378 | s.frames.lock().pop(); |
| 379 | } else { |
| 380 | debug_assert!( |
| 381 | false, |
| 382 | "pop_thread_frame called without initialized thread slot" |
| 383 | ); |
| 384 | } |
| 385 | }); |
| 386 | } |
| 387 | |
| 388 | /// Set the current thread's top frame pointer for signal-safe traceback walking. |
| 389 | /// Returns the previous frame pointer so it can be restored on pop. |