Changeset 6efe0ddf in mainline
- Timestamp:
- 2006-05-16T17:24:25Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- afa6e74
- Parents:
- aa0609b
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
init/init.c
raa0609b r6efe0ddf 326 326 } 327 327 328 static int test_as_ send()329 { 330 char *as ;328 static int test_as_area_send() 329 { 330 char *as_area; 331 331 int retval; 332 332 ipcarg_t result; 333 333 334 as = as_area_create((void *)(1024*1024), 16384, AS_AREA_READ | AS_AREA_WRITE);335 if (!as ) {336 printf("Error creating as .\n");334 as_area = as_area_create((void *)(1024*1024), 16384, AS_AREA_READ | AS_AREA_WRITE); 335 if (!as_area) { 336 printf("Error creating as_area.\n"); 337 337 return 0; 338 338 } 339 339 340 memcpy(as , "Hello world.\n", 14);341 342 retval = ipc_call_sync_2(PHONE_NS, IPC_M_AS_ SEND, 0, (sysarg_t) as,340 memcpy(as_area, "Hello world.\n", 14); 341 342 retval = ipc_call_sync_2(PHONE_NS, IPC_M_AS_AREA_SEND, 0, (sysarg_t) as_area, 343 343 NULL, NULL); 344 344 if (retval) { 345 printf("AS_ SEND failed.\n");345 printf("AS_AREA_SEND failed.\n"); 346 346 return 0; 347 347 } -
libc/generic/ipc.c
raa0609b r6efe0ddf 326 326 * 327 327 * 328 * Allocate s AS_area, notify the other side about our intention328 * Allocate as_area, notify the other side about our intention 329 329 * to open the connection 330 330 * -
ns/ns.c
raa0609b r6efe0ddf 78 78 ipc_call_t call; 79 79 ipc_callid_t callid; 80 char *as ;80 char *as_area; 81 81 82 82 ipcarg_t retval, arg1, arg2; … … 93 93 // printf("NS: Call in_phone_hash=%lX...", call.in_phone_hash); 94 94 switch (IPC_GET_METHOD(call)) { 95 case IPC_M_AS_ SEND:96 as = (char *)IPC_GET_ARG2(call);97 printf("Received as : %P, size:%d\n", as, IPC_GET_ARG3(call));95 case IPC_M_AS_AREA_SEND: 96 as_area = (char *)IPC_GET_ARG2(call); 97 printf("Received as_area: %P, size:%d\n", as_area, IPC_GET_ARG3(call)); 98 98 retval = ipc_answer_fast(callid, 0,(sysarg_t)(1024*1024), 0); 99 99 if (!retval) { 100 100 printf("Reading shared memory..."); 101 printf("Text: %s", as );101 printf("Text: %s", as_area); 102 102 } else 103 103 printf("Failed answer: %d\n", retval);
Note:
See TracChangeset
for help on using the changeset viewer.