Subversion Repositories HelenOS

Rev

Rev 2479 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2479 Rev 2482
Line 37... Line 37...
37
 
37
 
38
#include <libc.h>
38
#include <libc.h>
39
 
39
 
40
typedef struct {
40
typedef struct {
41
    void *self;
41
    void *self;
42
    void *pst_data;
42
    void *fibril_data;
43
} tcb_t;
43
} tcb_t;
44
 
44
 
45
static inline void __tcb_set(tcb_t *tcb)
45
static inline void __tcb_set(tcb_t *tcb)
46
{
46
{
47
    __SYSCALL1(SYS_TLS_SET, (sysarg_t) tcb);
47
    __SYSCALL1(SYS_TLS_SET, (sysarg_t) tcb);
48
}
48
}
49
 
49
 
50
static inline tcb_t * __tcb_get(void)
50
static inline tcb_t * __tcb_get(void)
51
{
51
{
52
    void * retval;
52
    void *retval;
53
 
53
 
54
    asm ("movl %%gs:0, %0" : "=r"(retval));
54
    asm ("movl %%gs:0, %0" : "=r"(retval));
55
    return retval;
55
    return retval;
56
}
56
}
57
 
57