Changeset 80649a91 in mainline for libc/generic/libc.c


Ignore:
Timestamp:
2006-05-21T19:28:37Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a410beb
Parents:
1ee11f4
Message:

Merged libadt into libc.
Made lot of psthread and thread stuff thread-safe.
Added new driver framework for easy C connection programming.
Changed FB code to use new API.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libc/generic/libc.c

    r1ee11f4 r80649a91  
    3434#include <io/stream.h>
    3535#include <ipc/ipc.h>
     36#include <async.h>
    3637
    3738void _exit(int status) {
     
    4041
    4142void __main(void) {
    42         tcb_t *tcb;
    43        
    44         tcb = __make_tls();
    45         __tcb_set(tcb);
    46         psthread_setup(tcb);
    47         _ipc_init();
     43        psthread_data_t *pt;
     44
     45        _async_init();
     46        pt = psthread_setup();
     47        __tcb_set(pt->tcb);
    4848}
    4949
     
    5555
    5656void __exit(void) {
    57         tcb_t *tcb;
    58 
    59         tcb = __tcb_get();
    60         psthread_teardown(tcb->pst_data);
    61         __free_tls(tcb);
     57        psthread_teardown(__tcb_get()->pst_data);
    6258        _exit(0);
    6359}
Note: See TracChangeset for help on using the changeset viewer.