zircon/kernel/kernel/scheduler.cc
// Returns a sufficiently unique flow id for a thread based on the thread id and
// queue generation count. This flow id cannot be used across enqueues because
// the generation count changes during enqueue.
Returns a sufficiently unique flow id for a thread based on the thread id and
queue generation count. This flow id cannot be used across enqueues because
the generation count changes during enqueue.
Returns a sufficiently unique flow id for a thread based on the thread id and queue generation count . This flow id cannot be used across enqueues because the generation count changes during enqueue .
inline uint64_t FlowIdFromThreadGeneration(const Thread* thread) {
  const int kRotationBits = 32;
  const uint64_t rotated_tid =
      (thread->user_tid() << kRotationBits) | (thread->user_tid() >> kRotationBits);
  return rotated_tid ^ thread->scheduler_state().generation();
}
inline uint64_t FlowIdFromThreadGeneration ( const Thread * thread ) { const int kRotationBits = 32 ; const uint64_t rotated_tid = ( thread -> user_tid ( ) << kRotationBits ) | ( thread -> user_tid ( ) >> kRotationBits ) ; return rotated_tid ^ thread -> scheduler_state ( ) . generation ( ) ; }
Returns a sufficiently unique flow id for a thread based on the thread id and
queue generation count.
Returns a sufficiently unique flow id for a thread based on the thread id and queue generation count .