Subversion Repositories HelenOS-historic

Rev

Rev 1113 | Rev 1350 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1113 Rev 1129
Line 34... Line 34...
34
 
34
 
35
void _exit(int status) {
35
void _exit(int status) {
36
    thread_exit(status);
36
    thread_exit(status);
37
}
37
}
38
 
38
 
-
 
39
#include <stdio.h>
39
void __main(void) {
40
void __main(void) {
-
 
41
    tcb_t *tcb;
-
 
42
   
40
    __tls_set(__make_tls());
43
    tcb = __make_tls();
-
 
44
    __tcb_set(tcb);
-
 
45
    psthread_setup(tcb);
41
}
46
}
42
 
47
 
43
void __exit(void) {
48
void __exit(void) {
44
    free(__tls_get());
49
    tcb_t *tcb;
45
   
50
 
-
 
51
    tcb = __tcb_get();
-
 
52
    psthread_teardown(tcb->pst_data);
-
 
53
    __free_tls(tcb);
46
    _exit(0);
54
    _exit(0);
47
}
55
}