https://jxself.org/git/linux-libre.git
Raw File
Tip revision: 0b142e26edd029d30b4b30f75a2d678c45c60cbf authored by Jason Self on 14 October 2013, 01:14:52 UTC
Linux-libre 3.11.5-gnu
Tip revision: 0b142e2
tls_64.c
#include <linux/sched.h>

void clear_flushed_tls(struct task_struct *task)
{
}

int arch_copy_tls(struct task_struct *t)
{
	/*
	 * If CLONE_SETTLS is set, we need to save the thread id
	 * (which is argument 5, child_tid, of clone) so it can be set
	 * during context switches.
	 */
	t->thread.arch.fs = t->thread.regs.regs.gp[R8 / sizeof(long)];

	return 0;
}
back to top