Changeset 7fc78da in mainline
- Timestamp:
- 2006-03-13T20:53:02Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a19bdf8
- Parents:
- b419162
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
init/init.c
rb419162 r7fc78da 32 32 int main(int argc, char *argv[]) 33 33 { 34 ipc_data_t ipcdata; 35 34 36 version_print(); 35 37 36 ipc_call_sync(0, 1, 2 );37 38 ipc_call_sync(0, 1, 2, &ipcdata); 39 38 40 return 0; 39 41 } -
libc/arch/ia32/src/syscall.c
rb419162 r7fc78da 29 29 #include <libc.h> 30 30 31 sysarg_t __syscall(const syscall_t id, const sysarg_t p1, const sysarg_t p2, const sysarg_t p3) 31 sysarg_t __syscall(const sysarg_t p1, const sysarg_t p2, const sysarg_t p3, 32 const sysarg_t p4, const syscall_t id) 32 33 { 33 34 sysarg_t ret; … … 36 37 "int $0x30\n" 37 38 : "=a" (ret) 38 : "a" (id), 39 "b" (p1), 40 "c" (p2), 41 "d" (p3) 39 : "a" (p1), 40 "b" (p2), 41 "c" (p3), 42 "d" (p4), 43 "S" (id) 42 44 ); 43 45 -
libc/arch/mips32/src/syscall.c
rb419162 r7fc78da 30 30 31 31 sysarg_t __syscall(const sysarg_t p1, const sysarg_t p2, 32 const sysarg_t p3, const syscall_t id) 32 const sysarg_t p3, const sysarg_t p4, 33 const syscall_t id) 33 34 { 34 35 register sysarg_t __mips_reg_a0 asm("$4") = p1; 35 36 register sysarg_t __mips_reg_a1 asm("$5") = p2; 36 37 register sysarg_t __mips_reg_a2 asm("$6") = p3; 37 register sysarg_t __mips_reg_a3 asm("$7") = id; 38 register sysarg_t __mips_reg_a3 asm("$7") = p4; 39 register sysarg_t __mips_reg_t0 asm("$8") = id; 38 40 register sysarg_t __mips_reg_v0 asm("$2"); 39 41 … … 44 46 "r" (__mips_reg_a1), 45 47 "r" (__mips_reg_a2), 46 "r" (__mips_reg_a3) 48 "r" (__mips_reg_a3), 49 "r" (__mips_reg_t0) 47 50 ); 48 51 -
libc/include/libc.h
rb419162 r7fc78da 34 34 #include <kernel/syscall/syscall.h> 35 35 36 #define __SYSCALL0(id) __syscall(0, 0, 0, id) 37 #define __SYSCALL1(id, p1) __syscall(p1, 0, 0, id) 38 #define __SYSCALL2(id, p1, p2) __syscall(p1, p2, 0, id) 39 #define __SYSCALL3(id, p1, p2, p3) __syscall(p1,p2,p3,id) 36 #define __SYSCALL0(id) __syscall(0, 0, 0, 0, id) 37 #define __SYSCALL1(id, p1) __syscall(p1, 0, 0, 0, id) 38 #define __SYSCALL2(id, p1, p2) __syscall(p1, p2, 0, 0, id) 39 #define __SYSCALL3(id, p1, p2, p3) __syscall(p1,p2,p3, 0, id) 40 #define __SYSCALL4(id, p1, p2, p3, p4) __syscall(p1,p2,p3,p4,id) 40 41 41 42 extern void __main(void); 42 43 extern void __exit(void); 43 44 extern sysarg_t __syscall(const sysarg_t p1, const sysarg_t p2, 44 const sysarg_t p3, const syscall_t id); 45 const sysarg_t p3, const sysarg_t p4, 46 const syscall_t id); 45 47 46 48 -
libipc/generic/ipc.c
rb419162 r7fc78da 30 30 #include <libc.h> 31 31 32 static inline ipc_callid_t _ipc_call(int phoneid, int arg1, int arg2)32 int ipc_call_sync(int phoneid, int arg1, int arg2, ipc_data_t *resdata) 33 33 { 34 __SYSCALL3(SYS_IPC_CALL, phoneid, arg1, arg2); 35 } 36 37 int ipc_call_sync(int phoneid, int arg1, int arg2) 38 { 39 ipc_data_t resdata; 40 41 _ipc_call(phoneid, arg1, arg2); 42 ipc_wait_for_call(&resdata,0); 34 return __SYSCALL4(SYS_IPC_CALL_SYNC, phoneid, arg1, arg2, 35 (sysarg_t)resdata); 43 36 } 44 37 -
libipc/include/ipc.h
rb419162 r7fc78da 37 37 38 38 39 extern int ipc_call_sync(int phoneid, int arg1, int arg2 );39 extern int ipc_call_sync(int phoneid, int arg1, int arg2, ipc_data_t *resdata); 40 40 extern int ipc_wait_for_call(ipc_data_t *data, int flags); 41 41
Note:
See TracChangeset
for help on using the changeset viewer.