Rev 4601 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4601 | Rev 4617 | ||
---|---|---|---|
Line 59... | Line 59... | ||
59 | thread_exit(status); |
59 | thread_exit(status); |
60 | } |
60 | } |
61 | 61 | ||
62 | void __main(void *pcb_ptr) |
62 | void __main(void *pcb_ptr) |
63 | { |
63 | { |
- | 64 | int retval; |
|
- | 65 | ||
64 | __heap_init(); |
66 | __heap_init(); |
65 | __async_init(); |
67 | __async_init(); |
66 | fibril_t *fibril = fibril_setup(); |
68 | fibril_t *fibril = fibril_setup(); |
67 | __tcb_set(fibril->tcb); |
69 | __tcb_set(fibril->tcb); |
68 | 70 | ||
Line 80... | Line 82... | ||
80 | argc = __pcb->argc; |
82 | argc = __pcb->argc; |
81 | argv = __pcb->argv; |
83 | argv = __pcb->argv; |
82 | __stdio_init(__pcb->filc, __pcb->filv); |
84 | __stdio_init(__pcb->filc, __pcb->filv); |
83 | } |
85 | } |
84 | 86 | ||
85 | main(argc, argv); |
87 | retval = main(argc, argv); |
- | 88 | ||
86 | __stdio_done(); |
89 | __stdio_done(); |
- | 90 | (void) task_retval(retval); |
|
87 | } |
91 | } |
88 | 92 | ||
89 | void __exit(void) |
93 | void __exit(void) |
90 | { |
94 | { |
91 | fibril_teardown(__tcb_get()->fibril_data); |
95 | fibril_teardown(__tcb_get()->fibril_data); |