Changeset ea28272 in mainline for uspace/lib/c/generic/async.c


Ignore:
Timestamp:
2010-12-30T13:43:27Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d770deb
Parents:
d70d80ed (diff), f418e51 (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 mainline changes.

File:
1 edited

Legend:

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

    rd70d80ed rea28272  
    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:
     
    749749                return ENOMEM;
    750750        }
     751
     752        _async_sess_init();
    751753       
    752754        return 0;
     
    807809 *
    808810 */
    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)
     811aid_t async_send_fast(int phoneid, sysarg_t method, sysarg_t arg1,
     812    sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, ipc_call_t *dataptr)
    811813{
    812814        amsg_t *msg = malloc(sizeof(*msg));
     
    846848 *
    847849 */
    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,
     850aid_t async_send_slow(int phoneid, sysarg_t method, sysarg_t arg1,
     851    sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5,
    850852    ipc_call_t *dataptr)
    851853{
     
    875877 *
    876878 */
    877 void async_wait_for(aid_t amsgid, ipcarg_t *retval)
     879void async_wait_for(aid_t amsgid, sysarg_t *retval)
    878880{
    879881        amsg_t *msg = (amsg_t *) amsgid;
     
    911913 *
    912914 */
    913 int async_wait_timeout(aid_t amsgid, ipcarg_t *retval, suseconds_t timeout)
     915int async_wait_timeout(aid_t amsgid, sysarg_t *retval, suseconds_t timeout)
    914916{
    915917        amsg_t *msg = (amsg_t *) amsgid;
     
    10231025 *
    10241026 */
    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)
     1027sysarg_t async_req_fast(int phoneid, sysarg_t method, sysarg_t arg1,
     1028    sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t *r1, sysarg_t *r2,
     1029    sysarg_t *r3, sysarg_t *r4, sysarg_t *r5)
    10281030{
    10291031        ipc_call_t result;
     
    10311033            &result);
    10321034       
    1033         ipcarg_t rc;
     1035        sysarg_t rc;
    10341036        async_wait_for(eid, &rc);
    10351037       
     
    10721074 *
    10731075 */
    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)
     1076sysarg_t async_req_slow(int phoneid, sysarg_t method, sysarg_t arg1,
     1077    sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5, sysarg_t *r1,
     1078    sysarg_t *r2, sysarg_t *r3, sysarg_t *r4, sysarg_t *r5)
    10771079{
    10781080        ipc_call_t result;
     
    10801082            &result);
    10811083       
    1082         ipcarg_t rc;
     1084        sysarg_t rc;
    10831085        async_wait_for(eid, &rc);
    10841086       
     
    11131115 */
    11141116int
    1115 async_connect_me_to(int phoneid, ipcarg_t arg1, ipcarg_t arg2, ipcarg_t arg3)
     1117async_connect_me_to(int phoneid, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3)
    11161118{
    11171119        int rc;
    1118         ipcarg_t newphid;
     1120        sysarg_t newphid;
    11191121
    11201122        rc = async_req_3_5(phoneid, IPC_M_CONNECT_ME_TO, arg1, arg2, arg3, NULL,
     
    11401142 */
    11411143int
    1142 async_connect_me_to_blocking(int phoneid, ipcarg_t arg1, ipcarg_t arg2,
    1143     ipcarg_t arg3)
     1144async_connect_me_to_blocking(int phoneid, sysarg_t arg1, sysarg_t arg2,
     1145    sysarg_t arg3)
    11441146{
    11451147        int rc;
    1146         ipcarg_t newphid;
     1148        sysarg_t newphid;
    11471149
    11481150        rc = async_req_4_5(phoneid, IPC_M_CONNECT_ME_TO, arg1, arg2, arg3,
     
    11661168 * @return              Zero on success or a negative error code from errno.h.
    11671169 */
    1168 int async_share_in_start(int phoneid, void *dst, size_t size, ipcarg_t arg,
     1170int async_share_in_start(int phoneid, void *dst, size_t size, sysarg_t arg,
    11691171    int *flags)
    11701172{
    11711173        int res;
    11721174        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);
     1175        res = async_req_3_2(phoneid, IPC_M_SHARE_IN, (sysarg_t) dst,
     1176            (sysarg_t) size, arg, NULL, &tmp_flags);
    11751177        if (flags)
    11761178                *flags = tmp_flags;
     
    11991201
    12001202        *callid = async_get_call(&data);
    1201         if (IPC_GET_METHOD(data) != IPC_M_SHARE_IN)
     1203        if (IPC_GET_IMETHOD(data) != IPC_M_SHARE_IN)
    12021204                return 0;
    12031205        *size = (size_t) IPC_GET_ARG2(data);
     
    12311233int async_share_out_start(int phoneid, void *src, int flags)
    12321234{
    1233         return async_req_3_0(phoneid, IPC_M_SHARE_OUT, (ipcarg_t) src, 0,
    1234             (ipcarg_t) flags);
     1235        return async_req_3_0(phoneid, IPC_M_SHARE_OUT, (sysarg_t) src, 0,
     1236            (sysarg_t) flags);
    12351237}
    12361238
     
    12591261
    12601262        *callid = async_get_call(&data);
    1261         if (IPC_GET_METHOD(data) != IPC_M_SHARE_OUT)
     1263        if (IPC_GET_IMETHOD(data) != IPC_M_SHARE_OUT)
    12621264                return 0;
    12631265        *size = (size_t) IPC_GET_ARG2(data);
     
    12921294int async_data_read_start(int phoneid, void *dst, size_t size)
    12931295{
    1294         return async_req_2_0(phoneid, IPC_M_DATA_READ, (ipcarg_t) dst,
    1295             (ipcarg_t) size);
     1296        return async_req_2_0(phoneid, IPC_M_DATA_READ, (sysarg_t) dst,
     1297            (sysarg_t) size);
    12961298}
    12971299
     
    13171319
    13181320        *callid = async_get_call(&data);
    1319         if (IPC_GET_METHOD(data) != IPC_M_DATA_READ)
     1321        if (IPC_GET_IMETHOD(data) != IPC_M_DATA_READ)
    13201322                return 0;
    13211323        if (size)
     
    13451347 *
    13461348 */
    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)
     1349int async_data_read_forward_fast(int phoneid, sysarg_t method, sysarg_t arg1,
     1350    sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, ipc_call_t *dataptr)
    13491351{
    13501352        ipc_callid_t callid;
     
    13691371        }
    13701372       
    1371         ipcarg_t rc;
     1373        sysarg_t rc;
    13721374        async_wait_for(msg, &rc);
    13731375       
     
    13861388int async_data_write_start(int phoneid, const void *src, size_t size)
    13871389{
    1388         return async_req_2_0(phoneid, IPC_M_DATA_WRITE, (ipcarg_t) src,
    1389             (ipcarg_t) size);
     1390        return async_req_2_0(phoneid, IPC_M_DATA_WRITE, (sysarg_t) src,
     1391            (sysarg_t) size);
    13901392}
    13911393
     
    14121414       
    14131415        *callid = async_get_call(&data);
    1414         if (IPC_GET_METHOD(data) != IPC_M_DATA_WRITE)
     1416        if (IPC_GET_IMETHOD(data) != IPC_M_DATA_WRITE)
    14151417                return 0;
    14161418       
     
    15311533 *
    15321534 */
    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)
     1535int async_data_write_forward_fast(int phoneid, sysarg_t method, sysarg_t arg1,
     1536    sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, ipc_call_t *dataptr)
    15351537{
    15361538        ipc_callid_t callid;
     
    15551557        }
    15561558       
    1557         ipcarg_t rc;
     1559        sysarg_t rc;
    15581560        async_wait_for(msg, &rc);
    15591561       
Note: See TracChangeset for help on using the changeset viewer.