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

Changeset 2c4aa39 in mainline


Ignore:
Timestamp:
2011-08-17T16:22:40Z (10 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
df02460
Parents:
2bc13887
Message:

Add async framework wrappers for IPC_M_STATE_CHANGE_AUTHORIZE.

Location:
uspace/lib/c
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/async.c

    r2bc13887 r2c4aa39  
    24622462}
    24632463
     2464int async_state_change_start(async_exch_t *exch, sysarg_t arg1, sysarg_t arg2,
     2465    sysarg_t arg3, async_exch_t *other_exch)
     2466{
     2467        return async_req_5_0(exch, IPC_M_STATE_CHANGE_AUTHORIZE,
     2468            arg1, arg2, arg3, 0, other_exch->phone);
     2469}
     2470
     2471bool async_state_change_receive(ipc_callid_t *callid, sysarg_t *arg1,
     2472    sysarg_t *arg2, sysarg_t *arg3)
     2473{
     2474        assert(callid);
     2475
     2476        ipc_call_t call;
     2477        *callid = async_get_call(&call);
     2478
     2479        if (IPC_GET_IMETHOD(call) != IPC_M_STATE_CHANGE_AUTHORIZE)
     2480                return false;
     2481       
     2482        if (arg1)
     2483                *arg1 = IPC_GET_ARG1(call);
     2484        if (arg2)
     2485                *arg2 = IPC_GET_ARG2(call);
     2486        if (arg3)
     2487                *arg3 = IPC_GET_ARG3(call);
     2488
     2489        return true;
     2490}
     2491
     2492int async_state_change_finalize(ipc_callid_t callid, async_exch_t *other_exch)
     2493{
     2494        return ipc_answer_1(callid, EOK, other_exch->phone);
     2495}
     2496
    24642497/** @}
    24652498 */
  • uspace/lib/c/include/async.h

    r2bc13887 r2c4aa39  
    479479extern async_sess_t *async_callback_receive_start(exch_mgmt_t, ipc_call_t *);
    480480
     481extern int async_state_change_start(async_exch_t *, sysarg_t, sysarg_t,
     482    sysarg_t, async_exch_t *);
     483extern bool async_state_change_receive(ipc_callid_t *, sysarg_t *, sysarg_t *,
     484    sysarg_t *);
     485extern int async_state_change_finalize(ipc_callid_t, async_exch_t *);
     486
    481487#endif
    482488
Note: See TracChangeset for help on using the changeset viewer.