/uspace/trunk/libc/include/unistd.h |
---|
File deleted |
/uspace/trunk/libc/include/libc.h |
---|
40,7 → 40,7 |
extern void __main(void); |
extern void __exit(void); |
extern sysarg_t __syscall(const syscall_t id, const sysarg_t p1, const sysarg_t p2, const sysarg_t p3); |
extern unsigned int __syscall(const syscall_t id, const sysarg_t p1, const sysarg_t p2, const sysarg_t p3); |
#endif |
/uspace/trunk/libc/generic/io.c |
---|
43,5 → 43,5 |
ssize_t write(int fd, const void * buf, size_t count) |
{ |
return (ssize_t) __syscall(SYS_IO, (sysarg_t) fd, (sysarg_t) buf, (sysarg_t) count); |
return __syscall(SYS_IO, (sysarg_t) fd, (sysarg_t) buf, (sysarg_t) count); |
} |
/uspace/trunk/libc/arch/ia32/src/syscall.c |
---|
28,9 → 28,9 |
#include <libc.h> |
sysarg_t __syscall(const syscall_t id, const sysarg_t p1, const sysarg_t p2, const sysarg_t p3) |
unsigned int __syscall(const syscall_t id, const unsigned int p1, const unsigned int p2, const unsigned int p3) |
{ |
sysarg_t ret; |
unsigned int ret; |
asm volatile ( |
"int $0x80\n" |
/uspace/trunk/libc/arch/mips32el/src/syscall.c |
---|
28,13 → 28,13 |
#include <libc.h> |
sysarg_t __syscall(const syscall_t id, const sysarg_t p1, const sysarg_t p2, const sysarg_t p3) |
unsigned int __syscall(const syscall_t id, const unsigned int p1, const unsigned int p2, const unsigned int p3) |
{ |
register sysarg_t __mips_reg_a0 asm("$4") = p1; |
register sysarg_t __mips_reg_a1 asm("$5") = p2; |
register sysarg_t __mips_reg_a2 asm("$6") = p3; |
register sysarg_t __mips_reg_a3 asm("$7") = id; |
register sysarg_t __mips_reg_v0 asm("$2"); |
register unsigned int __mips_reg_a0 asm("$4") = p1; |
register unsigned int __mips_reg_a1 asm("$5") = p2; |
register unsigned int __mips_reg_a2 asm("$6") = p3; |
register unsigned int __mips_reg_a3 asm("$7") = id; |
register unsigned int __mips_reg_v0 asm("$2"); |
asm volatile ( |
"syscall\n" |