Changeset 11eae82 in mainline for init/init.c


Ignore:
Timestamp:
2006-03-16T20:57:12Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c05290e
Parents:
48627ab
Message:

Added support for ipc_connect_me_to.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • init/init.c

    r48627ab r11eae82  
    145145        ipc_callid_t callid;
    146146        ipc_call_t data;
     147        int i;
    147148
    148149        printf("Asking 0 to connect to me...\n");
    149150        res = ipc_connect_to_me(0, 1, 2, &taskid);
    150151        printf("Result: %d - taskid: %Q\n", res, taskid);
    151 //      while (1) {
     152        for (i=0; i < 100; i++) {
    152153                printf("----------------\n");
    153154                ipc_call_async(PHONE_NS, NS_PING_SVC, 0, "prov",
     
    156157                printf("Received ping\n");
    157158                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
     163static 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       
    160175}
    161176
     
    167182//      test_ping();
    168183//      test_async_ipc();
    169         test_advanced_ipc();
     184//      test_advanced_ipc();
     185        test_connection_ipc();
    170186        return 0;
    171187}
Note: See TracChangeset for help on using the changeset viewer.