Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4581 → Rev 4718

/branches/network/uspace/lib/libc/generic/libc.c/libc.c
52,11 → 52,8
#include <as.h>
#include <loader/pcb.h>
 
extern char _heap;
extern int main(int argc, char *argv[]);
 
int _errno;
 
void _exit(int status)
{
thread_exit(status);
64,9 → 61,10
 
void __main(void *pcb_ptr)
{
(void) as_area_create(&_heap, 1, AS_AREA_WRITE | AS_AREA_READ);
_async_init();
int retval;
 
__heap_init();
__async_init();
fibril_t *fibril = fibril_setup();
__tcb_set(fibril->tcb);
79,15 → 77,17
if (__pcb == NULL) {
argc = 0;
argv = NULL;
stdio_init(0, NULL);
__stdio_init(0, NULL);
} else {
argc = __pcb->argc;
argv = __pcb->argv;
stdio_init(__pcb->filc, __pcb->filv);
__stdio_init(__pcb->filc, __pcb->filv);
}
main(argc, argv);
stdio_done();
retval = main(argc, argv);
 
__stdio_done();
(void) task_retval(retval);
}
 
void __exit(void)