summaryrefslogtreecommitdiffstats
path: root/winsup/w32api/lib/kernel32.c
blob: c7c4b18078f9d041cbd6d46d74a130844cf988d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* extern (library) versions of inline functions defined in winnt.h */

void* GetCurrentFiber(void)
{
    void* ret;
    __asm__ volatile (
	      "movl	%%fs:0x10,%0"
	      : "=r" (ret) /* allow use of reg eax,ebx,ecx,edx,esi,edi */
		  :	
		);
    return ret;
}

void* GetFiberData(void)
{
    void* ret;
    __asm__ volatile (            
	      "movl	%%fs:0x10,%0\n"
	      "movl	(%0),%0"
	      : "=r" (ret) /* allow use of reg eax,ebx,ecx,edx,esi,edi */
		  :	
	      );
    return ret;
}