+ /* We should never change the header format */
+ if (include_worker_index) {
+ int worker_index;
+ MonoNativeThreadId tid = mono_native_thread_id_get ();
+ /*
+ * If the thread is not a worker thread we insert 0, which is interpreted
+ * as gc thread. Worker indexes are 1 based.
+ */
+ worker_index = sgen_thread_pool_is_thread_pool_thread (tid);
+ /* FIXME Consider using different index bases for different thread pools */
+ buffer->buffer [index++] = (unsigned char) worker_index;
+ }