Subversion Repositories HelenOS

Rev

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

Rev 1350 Rev 1363
Line 29... Line 29...
29
#include <libc.h>
29
#include <libc.h>
30
#include <unistd.h>
30
#include <unistd.h>
31
#include <thread.h>
31
#include <thread.h>
32
#include <malloc.h>
32
#include <malloc.h>
33
#include <psthread.h>
33
#include <psthread.h>
-
 
34
#include <io/stream.h>
-
 
35
 
-
 
36
int __DONT_OPEN_STDIO__;
34
 
37
 
35
/* We should probably merge libc and libipc together */
38
/* We should probably merge libc and libipc together */
36
extern void _ipc_init(void);
39
extern void _ipc_init(void);
37
 
40
 
38
void _exit(int status) {
41
void _exit(int status) {
Line 40... Line 43...
40
}
43
}
41
 
44
 
42
void __main(void) {
45
void __main(void) {
43
    tcb_t *tcb;
46
    tcb_t *tcb;
44
   
47
   
-
 
48
    if(!__DONT_OPEN_STDIO__)
-
 
49
    {
-
 
50
        open("stdin",0);
-
 
51
        open("stdout",0);
-
 
52
        open("stderr",0);
-
 
53
    }  
-
 
54
   
45
    tcb = __make_tls();
55
    tcb = __make_tls();
46
    __tcb_set(tcb);
56
    __tcb_set(tcb);
47
    psthread_setup(tcb);
57
    psthread_setup(tcb);
48
    _ipc_init();
58
    _ipc_init();
49
}
59
}