Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changes between Version 8 and Version 9 of IPC


Ignore:
Timestamp:
2018-07-05T09:50:32Z (16 months ago)
Author:
Martin Decky
Comment:

update according to async framework API changes

Legend:

Unmodified
Added
Removed
Modified
  • IPC

    v8 v9  
    197197
    198198{{{
    199         async_answer_1(callid, EOK, fd);
    200 }}}
    201 
    202 In this example, ''callid'' is the capability of the received call, ''EOK'' is the return value and ''fd'' is the only return argument.
     199        async_answer_1(&call, EOK, fd);
     200}}}
     201
     202In this example, ''call'' is the received call, ''EOK'' is the return value and ''fd'' is the only return argument.
    203203
    204204== Passing large data via IPC == #IpcDataCopy
     
    246246#include <async.h>
    247247...
    248         ipc_callid_t callid;
     248        ipc_call_t call;
    249249        size_t len;
    250         if (!async_data_write_receive(&callid, &len)) {
     250        if (!async_data_write_receive(&call, &len)) {
    251251                /* Protocol error - the sender is not sending data */
    252252        }
     
    266266        /* Allocate the receive buffer */
    267267
    268         (void) async_data_write_finalize(callid, path, len);
     268        (void) async_data_write_finalize(&call, path, len);
    269269}}}
    270270
     
    299299#include <async.h>
    300300...
    301         ipc_callid_t callid;
     301        ipc_call_t call;
    302302        size_t len;
    303         if (!async_data_read_receive(&callid, &len)) {
     303        if (!async_data_read_receive(&call, &len)) {
    304304                /* Protocol error - the sender is not accepting data */
    305305        }
     
    312312
    313313{{{
    314         (void) async_data_read_finalize(callid, dentry->data + pos, bytes);
     314        (void) async_data_read_finalize(&call, dentry->data + pos, bytes);
    315315}}}
    316316
     
    357357#include <async.h>
    358358...
    359         ipc_callid_t callid;
     359        ipc_call_t call;
    360360        size_t len;
    361361        int flags;
    362         if (!async_share_out_receive(&callid, &len, &flags)) {
     362        if (!async_share_out_receive(&call, &len, &flags)) {
    363363                /* Protocol error - the sender is sharing out an area */
    364364        }
     
    367367}}}
    368368
    369 After the offer is received, the server has a chance to reject it by answering ''callid'' with an error code distinct from EOK. The reason for denial can be an inappropriate ''len'' or non-suitable address space area flags in the ''flags'' variable. If the offer looks good to the server, it will accept it like this:
     369After the offer is received, the server has a chance to reject it by answering ''call'' with an error code distinct from EOK. The reason for denial can be an inappropriate ''len'' or non-suitable address space area flags in the ''flags'' variable. If the offer looks good to the server, it will accept it like this:
    370370
    371371{{{
    372372        void *fs_va;
    373         (void) async_share_out_finalize(callid, fs_va);
     373        (void) async_share_out_finalize(&call, fs_va);
    374374}}}
    375375
     
    402402#include <async.h>
    403403...
    404         ipc_callid_t callid;
     404        ipc_call_t call;
    405405        size_t size;
    406         if (!async_share_in_receive(&callid, &size)) {
     406        if (!async_share_in_receive(&call, &size)) {
    407407                /* Protocol error - the sender is not requesting a share */
    408408        }
     
    415415{{{
    416416        uint8_t *plb;
    417         (void) async_share_in_finalize(callid, plb, AS_AREA_READ | AS_AREA_CACHEABLE);
     417        (void) async_share_in_finalize(&call, plb, AS_AREA_READ | AS_AREA_CACHEABLE);
    418418}}}
    419419