/* On a newly forked process, the TLS descriptors haven't yet been flushed. So we mark them as such and the first switch_to will do the job.  */
void clear_flushed_tls(struct task_struct *task)
/* On a newly forked process, the TLS descriptors haven't yet been flushed. So we mark them as such and the first switch_to will do the job.  */
void clear_flushed_tls(struct task_struct *task)
{
	int i;
	for (i = GDT_ENTRY_TLS_MIN; i < GDT_ENTRY_TLS_MAX; i++) {
		struct uml_tls_struct* curr =
			&task->thread.arch.tls_array[i - GDT_ENTRY_TLS_MIN];
		if (!curr->present)
			continue;
		curr->flushed = 0;
	}
}