Skip to main content

context_switch

Macro context_switch 

Source
macro_rules! context_switch {
    ($category:tt, $cpu:expr, $outgoing_state:expr, $outgoing_tid:expr, $incoming_tid:expr $(, $key:tt => $val:expr)* $(,)?) => { ... };
}
Expand description

Writes a context switch record for the given threads when the given trace category is enabled.

§Arguments:

  • category: Filter category for the event. Expects a string literal or expression.
  • cpu: The CPU number on which the context switch occurred.
  • outgoing_state: The state of the outgoing thread (zx_thread_state_t).
  • outgoing_tid: The KOID of the outgoing thread.
  • incoming_tid: The KOID of the incoming thread.
  • …: List of key => value argument pairs.