Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1392 → Rev 1391

/uspace/trunk/libc/generic/libc.c
33,7 → 33,6
#include <psthread.h>
#include <io/stream.h>
#include <ipc/ipc.h>
#include <async.h>
 
void _exit(int status) {
thread_exit(status);
40,11 → 39,12
}
 
void __main(void) {
psthread_data_t *pt;
 
_async_init();
pt = psthread_setup();
__tcb_set(pt->tcb);
tcb_t *tcb;
tcb = __make_tls();
__tcb_set(tcb);
psthread_setup(tcb);
_ipc_init();
}
 
void __io_init(void) {
54,6 → 54,10
}
 
void __exit(void) {
psthread_teardown(__tcb_get()->pst_data);
tcb_t *tcb;
 
tcb = __tcb_get();
psthread_teardown(tcb->pst_data);
__free_tls(tcb);
_exit(0);
}