Changeset 631ca4d in mainline for generic/src/ipc/ipc.c


Ignore:
Timestamp:
2006-03-13T20:51:35Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5c089c3a
Parents:
25d7709
Message:

New synchronous ipc.
Widened syscall to support up to 5 parameters.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/src/ipc/ipc.c

    r25d7709 r631ca4d  
    106106}
    107107
    108 
    109 /** Send a request using phone to answerbox
     108/** Helper function to facilitate synchronous calls */
     109void ipc_call_sync(phone_t *phone, call_t *request)
     110{
     111        answerbox_t sync_box;
     112
     113        ipc_answerbox_init(&sync_box);
     114
     115        /* We will receive data on special box */
     116        request->callerbox = &sync_box;
     117
     118        ipc_call(phone, request);
     119        ipc_wait_for_call(&sync_box, 0);
     120}
     121
     122/** Send a asynchronous request using phone to answerbox
    110123 *
    111124 * @param phone Phone connected to answerbox
     
    200213                printf("Received phone call - %P %P\n",
    201214                       call->data[0], call->data[1]);
     215                call->data[0] = 0xbabaaaee;;
     216                call->data[1] = 0xaaaaeeee;
    202217                ipc_answer(&TASK->answerbox, call);
    203218                printf("Call answered.\n");
Note: See TracChangeset for help on using the changeset viewer.