Ignore:
Timestamp:
2007-10-30T22:54:11Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4d21cf8
Parents:
b2a0f6dd
Message:

Unify implementations of TLS variant I and variant II alloc_tls() and
free_tls_arch().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/arch/ia32/include/thread.h

    rb2a0f6dd rfa23560  
    3636#define LIBC_ia32_THREAD_H_
    3737
    38 #include <libc.h>
    39 
    40 typedef struct {
    41         void *self;
    42         void *fibril_data;
    43 } tcb_t;
    44 
    45 static inline void __tcb_set(tcb_t *tcb)
    46 {
    47         __SYSCALL1(SYS_TLS_SET, (sysarg_t) tcb);
    48 }
    49 
    50 static inline tcb_t * __tcb_get(void)
    51 {
    52         void *retval;
    53 
    54         asm ("movl %%gs:0, %0" : "=r"(retval));
    55         return retval;
    56 }
    57 
    5838#endif
    5939
Note: See TracChangeset for help on using the changeset viewer.