Changeset 6efe0ddf in mainline


Ignore:
Timestamp:
2006-05-16T17:24:25Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
afa6e74
Parents:
aa0609b
Message:

Sync with kernel.
Rename IPC_M_AS_SEND to IPC_M_AS_AREA_SEND.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • init/init.c

    raa0609b r6efe0ddf  
    326326}
    327327
    328 static int test_as_send()
    329 {
    330         char *as;
     328static int test_as_area_send()
     329{
     330        char *as_area;
    331331        int retval;
    332332        ipcarg_t result;
    333333
    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");
    337337                return 0;
    338338        }
    339339
    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,
    343343                NULL, NULL);
    344344        if (retval) {
    345                 printf("AS_SEND failed.\n");
     345                printf("AS_AREA_SEND failed.\n");
    346346                return 0;
    347347        }
  • libc/generic/ipc.c

    raa0609b r6efe0ddf  
    326326 *
    327327 *
    328  * Allocates AS_area, notify the other side about our intention
     328 * Allocate as_area, notify the other side about our intention
    329329 * to open the connection
    330330 *
  • ns/ns.c

    raa0609b r6efe0ddf  
    7878        ipc_call_t call;
    7979        ipc_callid_t callid;
    80         char *as;
     80        char *as_area;
    8181       
    8282        ipcarg_t retval, arg1, arg2;
     
    9393//              printf("NS: Call in_phone_hash=%lX...", call.in_phone_hash);
    9494                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));
    9898                        retval = ipc_answer_fast(callid, 0,(sysarg_t)(1024*1024), 0);
    9999                        if (!retval) {
    100100                                printf("Reading shared memory...");
    101                                 printf("Text: %s", as);
     101                                printf("Text: %s", as_area);
    102102                        } else
    103103                                printf("Failed answer: %d\n", retval);
Note: See TracChangeset for help on using the changeset viewer.