Changeset 8a568e3 in mainline for init/init.c


Ignore:
Timestamp:
2006-05-14T17:17:35Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
52352ec
Parents:
8071af9f
Message:

Added support to IPC for sharing pages. Remove old calls as_area_send/accept,
modify tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • init/init.c

    r8071af9f r8a568e3  
    3939#include <as.h>
    4040#include <ddi.h>
     41#include <string.h>
    4142
    4243int a;
     
    292293}
    293294
     295static int test_as_send()
     296{
     297        char *as;
     298        int retval;
     299        ipcarg_t result;
     300
     301        as = as_area_create((void *)(1024*1024), 16384, AS_AREA_READ | AS_AREA_WRITE);
     302        if (!as) {
     303                printf("Error creating as.\n");
     304                return 0;
     305        }
     306
     307        memcpy(as, "Hello world.\n", 14);
     308
     309        retval = ipc_call_sync_2(PHONE_NS, IPC_M_AS_SEND, 0, (sysarg_t) as,
     310                NULL, NULL);
     311        if (retval) {
     312                printf("AS_SEND failed.\n");
     313                return 0;
     314        }
     315        printf("Done\n");
     316}
     317
    294318int main(int argc, char *argv[])
    295319{
     
    307331//      test_hangup();
    308332//      test_slam();
    309        
     333        test_as_send();
     334/*     
    310335        printf("Userspace task, taskid=%llX\n", task_get_id());
    311336
     
    350375
    351376        printf("Main thread exiting.\n");
     377*/
    352378        return 0;
    353379}
Note: See TracChangeset for help on using the changeset viewer.