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

Changeset 5863a95 in mainline for uspace/lib/c/generic/async.c


Ignore:
Timestamp:
2010-12-17T08:59:35Z (11 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master
Children:
58854f2
Parents:
70e5ad5 (diff), 11658b64 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge development/ changes

File:
1 edited

Legend:

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

    r70e5ad5 r5863a95  
    120120        ipc_call_t *dataptr;
    121121       
    122         ipcarg_t retval;
     122        sysarg_t retval;
    123123} amsg_t;
    124124
     
    140140       
    141141        /** Incoming phone hash. */
    142         ipcarg_t in_phone_hash;
     142        sysarg_t in_phone_hash;
    143143       
    144144        /** Messages that should be delivered to this fibril. */
     
    288288        list_append(&msg->link, &conn->msg_queue);
    289289       
    290         if (IPC_GET_METHOD(*call) == IPC_M_PHONE_HUNGUP)
     290        if (IPC_GET_IMETHOD(*call) == IPC_M_PHONE_HUNGUP)
    291291                conn->close_callid = callid;
    292292       
     
    401401                         */
    402402                        memset(call, 0, sizeof(ipc_call_t));
    403                         IPC_SET_METHOD(*call, IPC_M_PHONE_HUNGUP);
     403                        IPC_SET_IMETHOD(*call, IPC_M_PHONE_HUNGUP);
    404404                        futex_up(&async_futex);
    405405                        return conn->close_callid;
     
    529529 *
    530530 */
    531 fid_t async_new_connection(ipcarg_t in_phone_hash, ipc_callid_t callid,
     531fid_t async_new_connection(sysarg_t in_phone_hash, ipc_callid_t callid,
    532532    ipc_call_t *call, void (*cfibril)(ipc_callid_t, ipc_call_t *))
    533533{
     
    588588        }
    589589       
    590         switch (IPC_GET_METHOD(*call)) {
     590        switch (IPC_GET_IMETHOD(*call)) {
    591591        case IPC_M_CONNECT_ME:
    592592        case IPC_M_CONNECT_ME_TO:
     
    807807 *
    808808 */
    809 aid_t async_send_fast(int phoneid, ipcarg_t method, ipcarg_t arg1,
    810     ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipc_call_t *dataptr)
     809aid_t async_send_fast(int phoneid, sysarg_t method, sysarg_t arg1,
     810    sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, ipc_call_t *dataptr)
    811811{
    812812        amsg_t *msg = malloc(sizeof(*msg));
     
    846846 *
    847847 */
    848 aid_t async_send_slow(int phoneid, ipcarg_t method, ipcarg_t arg1,
    849     ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t arg5,
     848aid_t async_send_slow(int phoneid, sysarg_t method, sysarg_t arg1,
     849    sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5,
    850850    ipc_call_t *dataptr)
    851851{
     
    875875 *
    876876 */
    877 void async_wait_for(aid_t amsgid, ipcarg_t *retval)
     877void async_wait_for(aid_t amsgid, sysarg_t *retval)
    878878{
    879879        amsg_t *msg = (amsg_t *) amsgid;
     
    911911 *
    912912 */
    913 int async_wait_timeout(aid_t amsgid, ipcarg_t *retval, suseconds_t timeout)
     913int async_wait_timeout(aid_t amsgid, sysarg_t *retval, suseconds_t timeout)
    914914{
    915915        amsg_t *msg = (amsg_t *) amsgid;
     
    10231023 *
    10241024 */
    1025 ipcarg_t async_req_fast(int phoneid, ipcarg_t method, ipcarg_t arg1,
    1026     ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t *r1, ipcarg_t *r2,
    1027     ipcarg_t *r3, ipcarg_t *r4, ipcarg_t *r5)
     1025sysarg_t async_req_fast(int phoneid, sysarg_t method, sysarg_t arg1,
     1026    sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t *r1, sysarg_t *r2,
     1027    sysarg_t *r3, sysarg_t *r4, sysarg_t *r5)
    10281028{
    10291029        ipc_call_t result;
     
    10311031            &result);
    10321032       
    1033         ipcarg_t rc;
     1033        sysarg_t rc;
    10341034        async_wait_for(eid, &rc);
    10351035       
     
    10721072 *
    10731073 */
    1074 ipcarg_t async_req_slow(int phoneid, ipcarg_t method, ipcarg_t arg1,
    1075     ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t arg5, ipcarg_t *r1,
    1076     ipcarg_t *r2, ipcarg_t *r3, ipcarg_t *r4, ipcarg_t *r5)
     1074sysarg_t async_req_slow(int phoneid, sysarg_t method, sysarg_t arg1,
     1075    sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5, sysarg_t *r1,
     1076    sysarg_t *r2, sysarg_t *r3, sysarg_t *r4, sysarg_t *r5)
    10771077{
    10781078        ipc_call_t result;
     
    10801080            &result);
    10811081       
    1082         ipcarg_t rc;
     1082        sysarg_t rc;
    10831083        async_wait_for(eid, &rc);
    10841084       
     
    11131113 */
    11141114int
    1115 async_connect_me_to(int phoneid, ipcarg_t arg1, ipcarg_t arg2, ipcarg_t arg3)
     1115async_connect_me_to(int phoneid, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3)
    11161116{
    11171117        int rc;
    1118         ipcarg_t newphid;
     1118        sysarg_t newphid;
    11191119
    11201120        rc = async_req_3_5(phoneid, IPC_M_CONNECT_ME_TO, arg1, arg2, arg3, NULL,
     
    11401140 */
    11411141int
    1142 async_connect_me_to_blocking(int phoneid, ipcarg_t arg1, ipcarg_t arg2,
    1143     ipcarg_t arg3)
     1142async_connect_me_to_blocking(int phoneid, sysarg_t arg1, sysarg_t arg2,
     1143    sysarg_t arg3)
    11441144{
    11451145        int rc;
    1146         ipcarg_t newphid;
     1146        sysarg_t newphid;
    11471147
    11481148        rc = async_req_4_5(phoneid, IPC_M_CONNECT_ME_TO, arg1, arg2, arg3,
     
    11661166 * @return              Zero on success or a negative error code from errno.h.
    11671167 */
    1168 int async_share_in_start(int phoneid, void *dst, size_t size, ipcarg_t arg,
     1168int async_share_in_start(int phoneid, void *dst, size_t size, sysarg_t arg,
    11691169    int *flags)
    11701170{
    11711171        int res;
    11721172        sysarg_t tmp_flags;
    1173         res = async_req_3_2(phoneid, IPC_M_SHARE_IN, (ipcarg_t) dst,
    1174             (ipcarg_t) size, arg, NULL, &tmp_flags);
     1173        res = async_req_3_2(phoneid, IPC_M_SHARE_IN, (sysarg_t) dst,
     1174            (sysarg_t) size, arg, NULL, &tmp_flags);
    11751175        if (flags)
    11761176                *flags = tmp_flags;
     
    11991199
    12001200        *callid = async_get_call(&data);
    1201         if (IPC_GET_METHOD(data) != IPC_M_SHARE_IN)
     1201        if (IPC_GET_IMETHOD(data) != IPC_M_SHARE_IN)
    12021202                return 0;
    12031203        *size = (size_t) IPC_GET_ARG2(data);
     
    12311231int async_share_out_start(int phoneid, void *src, int flags)
    12321232{
    1233         return async_req_3_0(phoneid, IPC_M_SHARE_OUT, (ipcarg_t) src, 0,
    1234             (ipcarg_t) flags);
     1233        return async_req_3_0(phoneid, IPC_M_SHARE_OUT, (sysarg_t) src, 0,
     1234            (sysarg_t) flags);
    12351235}
    12361236
     
    12591259
    12601260        *callid = async_get_call(&data);
    1261         if (IPC_GET_METHOD(data) != IPC_M_SHARE_OUT)
     1261        if (IPC_GET_IMETHOD(data) != IPC_M_SHARE_OUT)
    12621262                return 0;
    12631263        *size = (size_t) IPC_GET_ARG2(data);
     
    12921292int async_data_read_start(int phoneid, void *dst, size_t size)
    12931293{
    1294         return async_req_2_0(phoneid, IPC_M_DATA_READ, (ipcarg_t) dst,
    1295             (ipcarg_t) size);
     1294        return async_req_2_0(phoneid, IPC_M_DATA_READ, (sysarg_t) dst,
     1295            (sysarg_t) size);
    12961296}
    12971297
     
    13171317
    13181318        *callid = async_get_call(&data);
    1319         if (IPC_GET_METHOD(data) != IPC_M_DATA_READ)
     1319        if (IPC_GET_IMETHOD(data) != IPC_M_DATA_READ)
    13201320                return 0;
    13211321        if (size)
     
    13451345 *
    13461346 */
    1347 int async_data_read_forward_fast(int phoneid, ipcarg_t method, ipcarg_t arg1,
    1348     ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipc_call_t *dataptr)
     1347int async_data_read_forward_fast(int phoneid, sysarg_t method, sysarg_t arg1,
     1348    sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, ipc_call_t *dataptr)
    13491349{
    13501350        ipc_callid_t callid;
     
    13691369        }
    13701370       
    1371         ipcarg_t rc;
     1371        sysarg_t rc;
    13721372        async_wait_for(msg, &rc);
    13731373       
     
    13861386int async_data_write_start(int phoneid, const void *src, size_t size)
    13871387{
    1388         return async_req_2_0(phoneid, IPC_M_DATA_WRITE, (ipcarg_t) src,
    1389             (ipcarg_t) size);
     1388        return async_req_2_0(phoneid, IPC_M_DATA_WRITE, (sysarg_t) src,
     1389            (sysarg_t) size);
    13901390}
    13911391
     
    14121412       
    14131413        *callid = async_get_call(&data);
    1414         if (IPC_GET_METHOD(data) != IPC_M_DATA_WRITE)
     1414        if (IPC_GET_IMETHOD(data) != IPC_M_DATA_WRITE)
    14151415                return 0;
    14161416       
     
    15311531 *
    15321532 */
    1533 int async_data_write_forward_fast(int phoneid, ipcarg_t method, ipcarg_t arg1,
    1534     ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipc_call_t *dataptr)
     1533int async_data_write_forward_fast(int phoneid, sysarg_t method, sysarg_t arg1,
     1534    sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, ipc_call_t *dataptr)
    15351535{
    15361536        ipc_callid_t callid;
     
    15551555        }
    15561556       
    1557         ipcarg_t rc;
     1557        sysarg_t rc;
    15581558        async_wait_for(msg, &rc);
    15591559       
Note: See TracChangeset for help on using the changeset viewer.