Changeset c4c5de5 in mainline for libc/generic/libc.c


Ignore:
Timestamp:
2006-03-24T14:29:19Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8fe1cdb
Parents:
520492a
Message:

Completed support for TLS in GCC (modifier thread) for ia32,amd64,ia64 and mips.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libc/generic/libc.c

    r520492a rc4c5de5  
    3737}
    3838
     39#include <stdio.h>
    3940void __main(void) {
    40         __tls_set(__make_tls());
     41        tcb_t *tcb;
     42       
     43        tcb = __make_tls();
     44        __tcb_set(tcb);
     45        psthread_setup(tcb);
    4146}
    4247
    4348void __exit(void) {
    44         free(__tls_get());
    45        
     49        tcb_t *tcb;
     50
     51        tcb = __tcb_get();
     52        psthread_teardown(tcb->pst_data);
     53        __free_tls(tcb);
    4654        _exit(0);
    4755}
Note: See TracChangeset for help on using the changeset viewer.