Changeset 602ca36b in mainline
- Timestamp:
- 2006-05-02T21:50:06Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f33cb0b9
- Parents:
- fa3561f
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
libipc/generic/ipc.c
rfa3561f r602ca36b 263 263 } 264 264 265 int ipc_register_irq(int irq )266 { 267 return __SYSCALL 1(SYS_IPC_REGISTER_IRQ, irq);265 int ipc_register_irq(int irq, irq_code_t *ucode) 266 { 267 return __SYSCALL2(SYS_IPC_REGISTER_IRQ, irq, (sysarg_t) ucode); 268 268 } 269 269 -
libipc/include/ipc.h
rfa3561f r602ca36b 31 31 32 32 #include <kernel/ipc/ipc.h> 33 #include <kernel/ipc/irq.h> 33 34 #include <libc.h> 34 35 #include <types.h> … … 64 65 int ipc_connect_me_to(int phoneid, int arg1, int arg2); 65 66 int ipc_hangup(int phoneid); 66 int ipc_register_irq(int irq );67 int ipc_register_irq(int irq, irq_code_t *code); 67 68 int ipc_unregister_irq(int irq); 68 69 -
ns/ns.c
rfa3561f r602ca36b 5 5 #include <ns.h> 6 6 #include <errno.h> 7 /* 8 irq_cmd_t msim_cmds[1] = { 9 { CMD_MEM_READ_1, (void *)0xB0000000, 0 } 10 }; 7 11 12 irq_code_t msim_kbd = { 13 1, 14 msim_cmds 15 }; 16 */ 8 17 static int service; 9 18 … … 16 25 17 26 printf("NS:Name service started.\n"); 18 // ipc_register_irq( 1);27 // ipc_register_irq(2, &msim_kbd); 19 28 while (1) { 20 29 callid = ipc_wait_for_call(&call, 0); … … 22 31 switch (IPC_GET_METHOD(call)) { 23 32 case IPC_M_INTERRUPT: 24 printf("GOT INTERRUPT \n");33 printf("GOT INTERRUPT: %c\n", IPC_GET_ARG2(call)); 25 34 break; 26 35 case IPC_M_PHONE_HUNGUP: … … 59 68 break; 60 69 } 61 if (! (callid & IPC_CALLID_NOTIFICATION)) 70 if (! (callid & IPC_CALLID_NOTIFICATION)) { 71 printf("Answerinh\n"); 62 72 ipc_answer(callid, retval, arg1, arg2); 73 } 63 74 } 64 75 }
Note:
See TracChangeset
for help on using the changeset viewer.