Changeset 281b607 in mainline for arch/ia32/src/ia32.c


Ignore:
Timestamp:
2006-03-23T10:29:39Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a0bb10ef
Parents:
9aa72b4
Message:

Added basic kernel infrastructure for ThreadLocalStorage(TLS) for
ia32(complete),amd64(complete),mips32(missing emulation of rdhwr instruction).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/src/ia32.c

    r9aa72b4 r281b607  
    5252#include <interrupt.h>
    5353#include <arch/debugger.h>
     54#include <proc/thread.h>
     55#include <syscall/syscall.h>
    5456
    5557void arch_pre_mm_init(void)
     
    107109        }
    108110}
     111
     112/** Set Thread-local-storeage pointer
     113 *
     114 * TLS pointer is set in FS register. Unfortunately the 64-bit
     115 * part can be set only in CPL0 mode.
     116 *
     117 * The specs says, that on %fs:0 there is stored contents of %fs register,
     118 * we need not to go to CPL0 to read it.
     119 */
     120__native sys_tls_set(__native addr)
     121{
     122        THREAD->tls = addr;
     123        set_tls_desc(addr);
     124
     125        return 0;
     126}
Note: See TracChangeset for help on using the changeset viewer.