Changeset ab936440 in mainline for uspace/lib/c/generic/async/server.c


Ignore:
Timestamp:
2019-02-12T20:42:42Z (6 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f31ca47
Parents:
7f7817a9 (diff), 4805495 (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.
git-author:
Matthieu Riolo <matthieu.riolo@…> (2019-02-12 20:26:18)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2019-02-12 20:42:42)
Message:

Merge branch 'master' into bdsh_alias

Conflicts:

uspace/app/bdsh/Makefile
uspace/app/bdsh/cmds/modules/modules.h

Ccheck correction and removing header which includes itself

File:
1 edited

Legend:

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

    r7f7817a9 rab936440  
    9696 */
    9797
    98 #define LIBC_ASYNC_C_
     98#define _LIBC_ASYNC_C_
    9999#include <ipc/ipc.h>
    100100#include <async.h>
    101101#include "../private/async.h"
    102 #undef LIBC_ASYNC_C_
     102#undef _LIBC_ASYNC_C_
    103103
    104104#include <ipc/irq.h>
     
    871871
    872872                memset(call, 0, sizeof(ipc_call_t));
     873                IPC_SET_IMETHOD(*call, IPC_M_PHONE_HUNGUP);
     874                call->cap_handle = CAP_NIL;
    873875        }
    874876
    875877        return true;
     878}
     879
     880bool async_get_call(ipc_call_t *call)
     881{
     882        return async_get_call_timeout(call, 0);
    876883}
    877884
     
    10011008
    10021009/** Add one manager to manager list. */
    1003 fid_t async_create_manager(void)
     1010static fid_t async_create_manager(void)
    10041011{
    10051012        fid_t fid = fibril_create_generic(async_manager_fibril, NULL, PAGE_SIZE);
     
    10941101}
    10951102
    1096 errno_t async_forward_fast(ipc_call_t *call, async_exch_t *exch,
     1103static errno_t async_forward_fast(ipc_call_t *call, async_exch_t *exch,
    10971104    sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, unsigned int mode)
    10981105{
     
    11101117}
    11111118
    1112 errno_t async_forward_slow(ipc_call_t *call, async_exch_t *exch,
     1119static errno_t async_forward_slow(ipc_call_t *call, async_exch_t *exch,
    11131120    sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3,
    11141121    sysarg_t arg4, sysarg_t arg5, unsigned int mode)
     
    11251132        return ipc_forward_slow(chandle, exch->phone, imethod, arg1, arg2, arg3,
    11261133            arg4, arg5, mode);
     1134}
     1135
     1136errno_t async_forward_0(ipc_call_t *call, async_exch_t *exch, sysarg_t imethod,
     1137    unsigned int mode)
     1138{
     1139        return async_forward_fast(call, exch, imethod, 0, 0, mode);
     1140}
     1141
     1142errno_t async_forward_1(ipc_call_t *call, async_exch_t *exch, sysarg_t imethod,
     1143    sysarg_t arg1, unsigned int mode)
     1144{
     1145        return async_forward_fast(call, exch, imethod, arg1, 0, mode);
     1146}
     1147
     1148errno_t async_forward_2(ipc_call_t *call, async_exch_t *exch, sysarg_t imethod,
     1149    sysarg_t arg1, sysarg_t arg2, unsigned int mode)
     1150{
     1151        return async_forward_fast(call, exch, imethod, arg1, arg2, mode);
     1152}
     1153
     1154errno_t async_forward_3(ipc_call_t *call, async_exch_t *exch, sysarg_t imethod,
     1155    sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, unsigned int mode)
     1156{
     1157        return async_forward_slow(call, exch, imethod, arg1, arg2, arg3, 0, 0,
     1158            mode);
     1159}
     1160
     1161errno_t async_forward_4(ipc_call_t *call, async_exch_t *exch, sysarg_t imethod,
     1162    sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4,
     1163    unsigned int mode)
     1164{
     1165        return async_forward_slow(call, exch, imethod, arg1, arg2, arg3, arg4,
     1166            0, mode);
     1167}
     1168
     1169errno_t async_forward_5(ipc_call_t *call, async_exch_t *exch, sysarg_t imethod,
     1170    sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5,
     1171    unsigned int mode)
     1172{
     1173        return async_forward_slow(call, exch, imethod, arg1, arg2, arg3, arg4,
     1174            arg5, mode);
    11271175}
    11281176
     
    13181366 *
    13191367 */
    1320 errno_t async_data_read_forward_fast(async_exch_t *exch, sysarg_t imethod,
     1368static errno_t async_data_read_forward_fast(async_exch_t *exch, sysarg_t imethod,
    13211369    sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4,
    13221370    ipc_call_t *dataptr)
     
    13311379        }
    13321380
    1333         aid_t msg = async_send_fast(exch, imethod, arg1, arg2, arg3, arg4,
     1381        aid_t msg = async_send_4(exch, imethod, arg1, arg2, arg3, arg4,
    13341382            dataptr);
    13351383        if (msg == 0) {
     
    13501398
    13511399        return (errno_t) rc;
     1400}
     1401
     1402errno_t async_data_read_forward_0_0(async_exch_t *exch, sysarg_t imethod)
     1403{
     1404        return async_data_read_forward_fast(exch, imethod, 0, 0, 0, 0, NULL);
     1405}
     1406
     1407errno_t async_data_read_forward_1_0(async_exch_t *exch, sysarg_t imethod,
     1408    sysarg_t arg1)
     1409{
     1410        return async_data_read_forward_fast(exch, imethod, arg1, 0, 0, 0, NULL);
     1411}
     1412
     1413errno_t async_data_read_forward_2_0(async_exch_t *exch, sysarg_t imethod,
     1414    sysarg_t arg1, sysarg_t arg2)
     1415{
     1416        return async_data_read_forward_fast(exch, imethod, arg1, arg2, 0,
     1417            0, NULL);
     1418}
     1419
     1420errno_t async_data_read_forward_3_0(async_exch_t *exch, sysarg_t imethod,
     1421    sysarg_t arg1, sysarg_t arg2, sysarg_t arg3)
     1422{
     1423        return async_data_read_forward_fast(exch, imethod, arg1, arg2, arg3,
     1424            0, NULL);
     1425}
     1426
     1427errno_t async_data_read_forward_4_0(async_exch_t *exch, sysarg_t imethod,
     1428    sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4)
     1429{
     1430        return async_data_read_forward_fast(exch, imethod, arg1, arg2, arg3,
     1431            arg4, NULL);
     1432}
     1433
     1434errno_t async_data_read_forward_0_1(async_exch_t *exch, sysarg_t imethod,
     1435    ipc_call_t *dataptr)
     1436{
     1437        return async_data_read_forward_fast(exch, imethod, 0, 0, 0,
     1438            0, dataptr);
     1439}
     1440
     1441errno_t async_data_read_forward_1_1(async_exch_t *exch, sysarg_t imethod,
     1442    sysarg_t arg1, ipc_call_t *dataptr)
     1443{
     1444        return async_data_read_forward_fast(exch, imethod, arg1, 0, 0,
     1445            0, dataptr);
     1446}
     1447
     1448errno_t async_data_read_forward_2_1(async_exch_t *exch, sysarg_t imethod,
     1449    sysarg_t arg1, sysarg_t arg2, ipc_call_t *dataptr)
     1450{
     1451        return async_data_read_forward_fast(exch, imethod, arg1, arg2, 0,
     1452            0, dataptr);
     1453}
     1454
     1455errno_t async_data_read_forward_3_1(async_exch_t *exch, sysarg_t imethod,
     1456    sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, ipc_call_t *dataptr)
     1457{
     1458        return async_data_read_forward_fast(exch, imethod, arg1, arg2, arg3,
     1459            0, dataptr);
     1460}
     1461
     1462errno_t async_data_read_forward_4_1(async_exch_t *exch, sysarg_t imethod,
     1463    sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4,
     1464    ipc_call_t *dataptr)
     1465{
     1466        return async_data_read_forward_fast(exch, imethod, arg1, arg2, arg3,
     1467            arg4, dataptr);
    13521468}
    13531469
     
    14951611 *
    14961612 */
    1497 errno_t async_data_write_forward_fast(async_exch_t *exch, sysarg_t imethod,
    1498     sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4,
    1499     ipc_call_t *dataptr)
     1613static errno_t async_data_write_forward_fast(async_exch_t *exch,
     1614    sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3,
     1615    sysarg_t arg4, ipc_call_t *dataptr)
    15001616{
    15011617        if (exch == NULL)
     
    15081624        }
    15091625
    1510         aid_t msg = async_send_fast(exch, imethod, arg1, arg2, arg3, arg4,
     1626        aid_t msg = async_send_4(exch, imethod, arg1, arg2, arg3, arg4,
    15111627            dataptr);
    15121628        if (msg == 0) {
     
    15291645}
    15301646
     1647errno_t async_data_write_forward_0_0(async_exch_t *exch, sysarg_t imethod)
     1648{
     1649        return async_data_write_forward_fast(exch, imethod, 0, 0, 0,
     1650            0, NULL);
     1651}
     1652
     1653errno_t async_data_write_forward_1_0(async_exch_t *exch, sysarg_t imethod,
     1654    sysarg_t arg1)
     1655{
     1656        return async_data_write_forward_fast(exch, imethod, arg1, 0, 0,
     1657            0, NULL);
     1658}
     1659
     1660errno_t async_data_write_forward_2_0(async_exch_t *exch, sysarg_t imethod,
     1661    sysarg_t arg1, sysarg_t arg2)
     1662{
     1663        return async_data_write_forward_fast(exch, imethod, arg1, arg2, 0,
     1664            0, NULL);
     1665}
     1666
     1667errno_t async_data_write_forward_3_0(async_exch_t *exch, sysarg_t imethod,
     1668    sysarg_t arg1, sysarg_t arg2, sysarg_t arg3)
     1669{
     1670        return async_data_write_forward_fast(exch, imethod, arg1, arg2, arg3,
     1671            0, NULL);
     1672}
     1673
     1674errno_t async_data_write_forward_4_0(async_exch_t *exch, sysarg_t imethod,
     1675    sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4)
     1676{
     1677        return async_data_write_forward_fast(exch, imethod, arg1, arg2, arg3,
     1678            arg4, NULL);
     1679}
     1680
     1681errno_t async_data_write_forward_0_1(async_exch_t *exch, sysarg_t imethod,
     1682    ipc_call_t *dataptr)
     1683{
     1684        return async_data_write_forward_fast(exch, imethod, 0, 0, 0,
     1685            0, dataptr);
     1686}
     1687
     1688errno_t async_data_write_forward_1_1(async_exch_t *exch, sysarg_t imethod,
     1689    sysarg_t arg1, ipc_call_t *dataptr)
     1690{
     1691        return async_data_write_forward_fast(exch, imethod, arg1, 0, 0,
     1692            0, dataptr);
     1693}
     1694
     1695errno_t async_data_write_forward_2_1(async_exch_t *exch, sysarg_t imethod,
     1696    sysarg_t arg1, sysarg_t arg2, ipc_call_t *dataptr)
     1697{
     1698        return async_data_write_forward_fast(exch, imethod, arg1, arg2, 0,
     1699            0, dataptr);
     1700}
     1701
     1702errno_t async_data_write_forward_3_1(async_exch_t *exch, sysarg_t imethod,
     1703    sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, ipc_call_t *dataptr)
     1704{
     1705        return async_data_write_forward_fast(exch, imethod, arg1, arg2, arg3,
     1706            0, dataptr);
     1707}
     1708
     1709errno_t async_data_write_forward_4_1(async_exch_t *exch, sysarg_t imethod,
     1710    sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4,
     1711    ipc_call_t *dataptr)
     1712{
     1713        return async_data_write_forward_fast(exch, imethod, arg1, arg2, arg3,
     1714            arg4, dataptr);
     1715}
     1716
    15311717/** Wrapper for receiving the IPC_M_CONNECT_TO_ME calls.
    15321718 *
Note: See TracChangeset for help on using the changeset viewer.