/branches/dynload/uspace/lib/libc/include/stdio.h |
---|
49,7 → 49,7 |
int n; \ |
n = snprintf(buf, sizeof(buf), fmt, ##__VA_ARGS__); \ |
if (n > 0) \ |
(void) __SYSCALL3(SYS_IO, 1, (sysarg_t) buf, strlen(buf)); \ |
(void) __SYSCALL3(SYS_KLOG, 1, (sysarg_t) buf, strlen(buf)); \ |
} |
extern int getchar(void); |
/branches/dynload/uspace/lib/libc/include/io/stream.h |
---|
40,6 → 40,7 |
#define EMFILE -17 |
extern void open_console(void); |
extern void klog_update(void); |
extern ssize_t read_stdin(void *, size_t); |
extern ssize_t write_stdout(const void *, size_t); |
/branches/dynload/uspace/lib/libc/generic/io/stream.c |
---|
67,6 → 67,8 |
((char *) buf)[i++] = r0; |
} |
return i; |
} else { |
return -1; |
} |
} |
82,7 → 84,7 |
return count; |
} else |
return __SYSCALL3(SYS_IO, 1, (sysarg_t) buf, count); |
return __SYSCALL3(SYS_KLOG, 1, (sysarg_t) buf, count); |
} |
void open_console(void) |
94,6 → 96,11 |
} |
} |
void klog_update(void) |
{ |
(void) __SYSCALL3(SYS_KLOG, 1, NULL, 0); |
} |
int get_cons_phone(void) |
{ |
open_console(); |
/branches/dynload/uspace/lib/libc/arch/ia64/src/entry.s |
---|
31,7 → 31,6 |
.org 0 |
.globl __entry |
.globl __entry_driver |
## User-space task entry point |
# |
41,17 → 40,6 |
mov r1 = _gp |
br.call.sptk.many b0 = __main |
0: |
br.call.sptk.many b0 = __io_init |
1: |
br.call.sptk.many b0 = main |
2: |
br.call.sptk.many b0 = __exit |
__entry_driver: |
alloc loc0 = ar.pfs, 0, 1, 2, 0 |
mov r1 = _gp |
br.call.sptk.many b0 = __main |
0: |
br.call.sptk.many b0 = main |
1: |
br.call.sptk.many b0 = __exit |
/branches/dynload/uspace/lib/libc/arch/arm32/src/entry.s |
---|
31,7 → 31,6 |
.org 0 |
.global __entry |
.global __entry_driver |
## User-space task entry point |
# |
38,12 → 37,5 |
# |
__entry: |
bl __main |
bl __io_init |
bl main |
bl __exit |
__entry_driver: |
bl __main |
bl main |
bl __exit |
/branches/dynload/uspace/lib/libc/arch/mips32/src/entry.s |
---|
52,9 → 52,6 |
jal __main |
nop |
jal __io_init |
nop |
jal main |
nop |
62,28 → 59,6 |
nop |
.end |
.ent __entry_driver |
__entry_driver: |
.frame $sp, 32, $31 |
.cpload $25 |
# Mips o32 may store its arguments on stack, make space (16 bytes), |
# so that it could work with -O0 |
# Make space additional 16 bytes for the stack frame |
addiu $sp, -32 |
.cprestore 16 # Allow PIC code |
jal __main |
nop |
jal main |
nop |
jal __exit |
nop |
.end |
# Alignment of output section data to 0x4000 |
.section .data |
.align 14 |