about summary refs log tree commit diff
path: root/src/thread/__set_thread_area.c
blob: 576d8b40049399b48a7f4b264c8e47edb25af1f0 (plain) (blame)
1
2
3
4
5
6
7
8
9
#include "syscall.h"

int __set_thread_area(unsigned long *desc)
{
	if (syscall1(__NR_set_thread_area, (long)desc) < 0)
		return -1;
	__asm__ __volatile__ ( "movw %w0,%%gs" : : "r"(desc[0]*8+3) );
	return 0;
}