B.2.2 smp_thread_id()

Because the thread_id_t returned from create_thread() is system-dependent, the smp_thread_id() primitive returns a thread index corresponding to the thread making the request. This index is guaranteed to be less than the maximum number of threads that have been in existence since the program started, and is therefore useful for bitmasks, array indices, and the like.



Paul E. McKenney 2011-12-16