Changeset 11eae82 in mainline
- Timestamp:
- 2006-03-16T20:57:12Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c05290e
- Parents:
- 48627ab
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
init/init.c
r48627ab r11eae82 145 145 ipc_callid_t callid; 146 146 ipc_call_t data; 147 int i; 147 148 148 149 printf("Asking 0 to connect to me...\n"); 149 150 res = ipc_connect_to_me(0, 1, 2, &taskid); 150 151 printf("Result: %d - taskid: %Q\n", res, taskid); 151 // while (1) {152 for (i=0; i < 100; i++) { 152 153 printf("----------------\n"); 153 154 ipc_call_async(PHONE_NS, NS_PING_SVC, 0, "prov", … … 156 157 printf("Received ping\n"); 157 158 ipc_answer(callid, 0, 0, 0); 158 // } 159 callid = ipc_wait_for_call(&data, NULL); 159 } 160 callid = ipc_wait_for_call(&data, NULL); 161 } 162 163 static void test_connection_ipc(void) 164 { 165 int res; 166 ipcarg_t result; 167 168 printf("Starting connect...\n"); 169 res = ipc_connect_me_to(PHONE_NS, 10, 20); 170 printf("Connected: %d\n", res); 171 printf("pinging.\n"); 172 res = ipc_call_sync(res, NS_PING, 0xbeef,&result); 173 printf("Retval: %d - received: %P\n", res, result); 174 160 175 } 161 176 … … 167 182 // test_ping(); 168 183 // test_async_ipc(); 169 test_advanced_ipc(); 184 // test_advanced_ipc(); 185 test_connection_ipc(); 170 186 return 0; 171 187 } -
libipc/generic/ipc.c
r48627ab r11eae82 246 246 (sysarg_t) taskid); 247 247 } 248 249 /** Ask through phone for a new connection to some service */ 250 int ipc_connect_me_to(int phoneid, int arg1, int arg2) 251 { 252 return __SYSCALL3(SYS_IPC_CONNECT_ME_TO, phoneid, arg1, arg2); 253 } 254 -
libipc/include/ipc.h
r48627ab r11eae82 65 65 int ipc_connect_to_me(int phoneid, int arg1, int arg2, 66 66 unsigned long long *taskid); 67 int ipc_connect_me_to(int phoneid, int arg1, int arg2); 67 68 68 69 #endif -
ns/ns.c
r48627ab r11eae82 25 25 retval = 0; 26 26 break; 27 case IPC_M_CONNECTMETO: 28 printf("Somebody wants to connect to: %d\n", 29 IPC_GET_ARG1(call.data)); 30 retval = 0; 31 break; 27 32 case NS_PING: 28 33 printf("Ping...%P %P\n", IPC_GET_ARG1(call.data),
Note:
See TracChangeset
for help on using the changeset viewer.