Changeset 936351c1 in mainline for init/init.c


Ignore:
Timestamp:
2006-03-14T23:48:33Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d73942c
Parents:
4f34b6a
Message:

Completed asynchronous IPC.
Fixed sbrk.
Cleared some unnecessary defines in malloc.
Changed u8 * to char * in list.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • init/init.c

    r4f34b6a r936351c1  
    3333#include <unistd.h>
    3434#include <stdlib.h>
     35
    3536/*
    3637static void test_printf(void)
     
    4546}
    4647*/
     48
    4749/*
    4850static void test_mremap(void)
     
    9092*/
    9193
     94/*
     95static void got_answer(void *private, int retval, ipc_data_t *data)
     96{
     97        printf("Retval: %d...%s...%X, %X\n", retval, private,
     98               IPC_GET_ARG1(*data), IPC_GET_ARG2(*data));
     99}
     100static void test_async_ipc(void)
     101{
     102        ipc_data_t data;
     103        int i;
     104
     105        printf("Sending ping\n");
     106        ipc_call_async_2(PHONE_NS, NS_PING, 1, 0xbeefbee2,
     107                         "Pong1", got_answer);
     108        ipc_call_async_2(PHONE_NS, NS_PING, 2, 0xbeefbee4,
     109                         "Pong2", got_answer);
     110        ipc_call_async_2(PHONE_NS, NS_PING, 3, 0xbeefbee4,
     111                         "Pong3", got_answer);
     112        ipc_call_async_2(PHONE_NS, NS_PING, 4, 0xbeefbee4,
     113                         "Pong4", got_answer);
     114        ipc_call_async_2(PHONE_NS, NS_PING, 5, 0xbeefbee4,
     115                         "Pong5", got_answer);
     116        ipc_call_async_2(PHONE_NS, NS_PING, 6, 0xbeefbee4,
     117                         "Pong6", got_answer);
     118        printf("Waiting forever...\n");
     119        for (i=0; i<100;i++)
     120                printf(".");
     121        printf("\n");
     122        ipc_wait_for_call(&data, NULL);
     123        printf("Received call???\n");
     124}
     125*/
     126
    92127int main(int argc, char *argv[])
    93128{
     129        ipcarg_t arg1, arg2;
     130
    94131        version_print();
    95132
    96         ipc_call_sync_2(PHONE_NS, NS_PING, 2, 0, 0, 0);
     133        ipc_call_sync_2(PHONE_NS, NS_PING, 0xaaaa, 0xbbbb, &arg1, &arg2);
     134        printf("Pong: %P %P\n", arg1, arg2);
    97135       
    98136        return 0;
Note: See TracChangeset for help on using the changeset viewer.