Changeset d5a89a3 in mainline for uspace/lib/c/generic/async/client.c


Ignore:
Timestamp:
2019-02-11T22:31:04Z (6 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
aaf9789c
Parents:
e3272101 (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.
Message:

merging with upstream/master

File:
1 edited

Legend:

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

    re3272101 rd5a89a3  
    9595 */
    9696
    97 #define LIBC_ASYNC_C_
     97#define _LIBC_ASYNC_C_
    9898#include <ipc/ipc.h>
    9999#include <async.h>
    100100#include "../private/async.h"
    101101#include "../private/ns.h"
    102 #undef LIBC_ASYNC_C_
     102#undef _LIBC_ASYNC_C_
    103103
    104104#include <ipc/irq.h>
     
    249249 *
    250250 */
    251 aid_t async_send_fast(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1,
     251static aid_t async_send_fast(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1,
    252252    sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, ipc_call_t *dataptr)
    253253{
     
    289289 *
    290290 */
    291 aid_t async_send_slow(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1,
     291static aid_t async_send_slow(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1,
    292292    sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5,
    293293    ipc_call_t *dataptr)
     
    310310
    311311        return (aid_t) msg;
     312}
     313
     314aid_t async_send_0(async_exch_t *exch, sysarg_t imethod, ipc_call_t *dataptr)
     315{
     316        return async_send_fast(exch, imethod, 0, 0, 0, 0, dataptr);
     317}
     318
     319aid_t async_send_1(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1,
     320    ipc_call_t *dataptr)
     321{
     322        return async_send_fast(exch, imethod, arg1, 0, 0, 0, dataptr);
     323}
     324
     325aid_t async_send_2(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1,
     326    sysarg_t arg2, ipc_call_t *dataptr)
     327{
     328        return async_send_fast(exch, imethod, arg1, arg2, 0, 0, dataptr);
     329}
     330
     331aid_t async_send_3(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1,
     332    sysarg_t arg2, sysarg_t arg3, ipc_call_t *dataptr)
     333{
     334        return async_send_fast(exch, imethod, arg1, arg2, arg3, 0, dataptr);
     335}
     336
     337aid_t async_send_4(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1,
     338    sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, ipc_call_t *dataptr)
     339{
     340        return async_send_fast(exch, imethod, arg1, arg2, arg3, arg4, dataptr);
     341}
     342
     343aid_t async_send_5(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1,
     344    sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5,
     345    ipc_call_t *dataptr)
     346{
     347        return async_send_slow(exch, imethod, arg1, arg2, arg3, arg4, arg5,
     348            dataptr);
    312349}
    313350
     
    434471 *
    435472 */
    436 errno_t async_req_fast(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1,
    437     sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t *r1, sysarg_t *r2,
    438     sysarg_t *r3, sysarg_t *r4, sysarg_t *r5)
     473static errno_t async_req_fast(async_exch_t *exch, sysarg_t imethod,
     474    sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4,
     475    sysarg_t *r1, sysarg_t *r2, sysarg_t *r3, sysarg_t *r4, sysarg_t *r5)
    439476{
    440477        if (exch == NULL)
     
    486523 *
    487524 */
    488 errno_t async_req_slow(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1,
    489     sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5, sysarg_t *r1,
    490     sysarg_t *r2, sysarg_t *r3, sysarg_t *r4, sysarg_t *r5)
     525static errno_t async_req_slow(async_exch_t *exch, sysarg_t imethod,
     526    sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5,
     527    sysarg_t *r1, sysarg_t *r2, sysarg_t *r3, sysarg_t *r4, sysarg_t *r5)
    491528{
    492529        if (exch == NULL)
     
    516553
    517554        return rc;
     555}
     556
     557errno_t async_req_0_0(async_exch_t *exch, sysarg_t imethod)
     558{
     559        return async_req_fast(exch, imethod, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL);
     560}
     561
     562errno_t async_req_0_1(async_exch_t *exch, sysarg_t imethod, sysarg_t *r1)
     563{
     564        return async_req_fast(exch, imethod, 0, 0, 0, 0, r1, NULL, NULL, NULL, NULL);
     565}
     566
     567errno_t async_req_0_2(async_exch_t *exch, sysarg_t imethod, sysarg_t *r1, sysarg_t *r2)
     568{
     569        return async_req_fast(exch, imethod, 0, 0, 0, 0, r1, r2, NULL, NULL, NULL);
     570}
     571
     572errno_t async_req_0_3(async_exch_t *exch, sysarg_t imethod, sysarg_t *r1, sysarg_t *r2, sysarg_t *r3)
     573{
     574        return async_req_fast(exch, imethod, 0, 0, 0, 0, r1, r2, r3, NULL, NULL);
     575}
     576
     577errno_t async_req_0_4(async_exch_t *exch, sysarg_t imethod, sysarg_t *r1, sysarg_t *r2, sysarg_t *r3, sysarg_t *r4)
     578{
     579        return async_req_fast(exch, imethod, 0, 0, 0, 0, r1, r2, r3, r4, NULL);
     580}
     581
     582errno_t async_req_0_5(async_exch_t *exch, sysarg_t imethod, sysarg_t *r1, sysarg_t *r2, sysarg_t *r3, sysarg_t *r4, sysarg_t *r5)
     583{
     584        return async_req_fast(exch, imethod, 0, 0, 0, 0, r1, r2, r3, r4, r5);
     585}
     586
     587errno_t async_req_1_0(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1)
     588{
     589        return async_req_fast(exch, imethod, arg1, 0, 0, 0, NULL, NULL, NULL, NULL, NULL);
     590}
     591
     592errno_t async_req_1_1(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1, sysarg_t *r1)
     593{
     594        return async_req_fast(exch, imethod, arg1, 0, 0, 0, r1, NULL, NULL, NULL, NULL);
     595}
     596
     597errno_t async_req_1_2(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1, sysarg_t *r1, sysarg_t *r2)
     598{
     599        return async_req_fast(exch, imethod, arg1, 0, 0, 0, r1, r2, NULL, NULL, NULL);
     600}
     601
     602errno_t async_req_1_3(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1, sysarg_t *r1, sysarg_t *r2, sysarg_t *r3)
     603{
     604        return async_req_fast(exch, imethod, arg1, 0, 0, 0, r1, r2, r3, NULL, NULL);
     605}
     606
     607errno_t async_req_1_4(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1, sysarg_t *r1, sysarg_t *r2, sysarg_t *r3, sysarg_t *r4)
     608{
     609        return async_req_fast(exch, imethod, arg1, 0, 0, 0, r1, r2, r3, r4, NULL);
     610}
     611
     612errno_t async_req_1_5(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1, sysarg_t *r1, sysarg_t *r2, sysarg_t *r3, sysarg_t *r4, sysarg_t *r5)
     613{
     614        return async_req_fast(exch, imethod, arg1, 0, 0, 0, r1, r2, r3, r4, r5);
     615}
     616
     617errno_t async_req_2_0(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2)
     618{
     619        return async_req_fast(exch, imethod, arg1, arg2, 0, 0, NULL, NULL, NULL, NULL, NULL);
     620}
     621
     622errno_t async_req_2_1(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t *r1)
     623{
     624        return async_req_fast(exch, imethod, arg1, arg2, 0, 0, r1, NULL, NULL, NULL, NULL);
     625}
     626
     627errno_t async_req_2_2(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t *r1, sysarg_t *r2)
     628{
     629        return async_req_fast(exch, imethod, arg1, arg2, 0, 0, r1, r2, NULL, NULL, NULL);
     630}
     631
     632errno_t async_req_2_3(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t *r1, sysarg_t *r2, sysarg_t *r3)
     633{
     634        return async_req_fast(exch, imethod, arg1, arg2, 0, 0, r1, r2, r3, NULL, NULL);
     635}
     636
     637errno_t async_req_2_4(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t *r1, sysarg_t *r2, sysarg_t *r3, sysarg_t *r4)
     638{
     639        return async_req_fast(exch, imethod, arg1, arg2, 0, 0, r1, r2, r3, r4, NULL);
     640}
     641
     642errno_t async_req_2_5(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t *r1, sysarg_t *r2, sysarg_t *r3, sysarg_t *r4, sysarg_t *r5)
     643{
     644        return async_req_fast(exch, imethod, arg1, arg2, 0, 0, r1, r2, r3, r4, r5);
     645}
     646
     647errno_t async_req_3_0(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3)
     648{
     649        return async_req_fast(exch, imethod, arg1, arg2, arg3, 0, NULL, NULL, NULL, NULL, NULL);
     650}
     651
     652errno_t async_req_3_1(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t *r1)
     653{
     654        return async_req_fast(exch, imethod, arg1, arg2, arg3, 0, r1, NULL, NULL, NULL, NULL);
     655}
     656
     657errno_t async_req_3_2(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t *r1, sysarg_t *r2)
     658{
     659        return async_req_fast(exch, imethod, arg1, arg2, arg3, 0, r1, r2, NULL, NULL, NULL);
     660}
     661
     662errno_t async_req_3_3(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t *r1, sysarg_t *r2, sysarg_t *r3)
     663{
     664        return async_req_fast(exch, imethod, arg1, arg2, arg3, 0, r1, r2, r3, NULL, NULL);
     665}
     666
     667errno_t async_req_3_4(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t *r1, sysarg_t *r2, sysarg_t *r3, sysarg_t *r4)
     668{
     669        return async_req_fast(exch, imethod, arg1, arg2, arg3, 0, r1, r2, r3, r4, NULL);
     670}
     671
     672errno_t async_req_3_5(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t *r1, sysarg_t *r2, sysarg_t *r3, sysarg_t *r4, sysarg_t *r5)
     673{
     674        return async_req_fast(exch, imethod, arg1, arg2, arg3, 0, r1, r2, r3, r4, r5);
     675}
     676
     677errno_t async_req_4_0(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4)
     678{
     679        return async_req_fast(exch, imethod, arg1, arg2, arg3, arg4, NULL, NULL, NULL, NULL, NULL);
     680}
     681
     682errno_t async_req_4_1(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t *r1)
     683{
     684        return async_req_fast(exch, imethod, arg1, arg2, arg3, arg4, r1, NULL, NULL, NULL, NULL);
     685}
     686
     687errno_t async_req_4_2(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t *r1, sysarg_t *r2)
     688{
     689        return async_req_fast(exch, imethod, arg1, arg2, arg3, arg4, r1, r2, NULL, NULL, NULL);
     690}
     691
     692errno_t async_req_4_3(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t *r1, sysarg_t *r2, sysarg_t *r3)
     693{
     694        return async_req_fast(exch, imethod, arg1, arg2, arg3, arg4, r1, r2, r3, NULL, NULL);
     695}
     696
     697errno_t async_req_4_4(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t *r1, sysarg_t *r2, sysarg_t *r3, sysarg_t *r4)
     698{
     699        return async_req_fast(exch, imethod, arg1, arg2, arg3, arg4, r1, r2, r3, r4, NULL);
     700}
     701
     702errno_t async_req_4_5(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t *r1, sysarg_t *r2, sysarg_t *r3, sysarg_t *r4, sysarg_t *r5)
     703{
     704        return async_req_fast(exch, imethod, arg1, arg2, arg3, arg4, r1, r2, r3, r4, r5);
     705}
     706
     707errno_t async_req_5_0(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5)
     708{
     709        return async_req_slow(exch, imethod, arg1, arg2, arg3, arg4, arg5, NULL, NULL, NULL, NULL, NULL);
     710}
     711
     712errno_t async_req_5_1(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5, sysarg_t *r1)
     713{
     714        return async_req_slow(exch, imethod, arg1, arg2, arg3, arg4, arg5, r1, NULL, NULL, NULL, NULL);
     715}
     716
     717errno_t async_req_5_2(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5, sysarg_t *r1, sysarg_t *r2)
     718{
     719        return async_req_slow(exch, imethod, arg1, arg2, arg3, arg4, arg5, r1, r2, NULL, NULL, NULL);
     720}
     721
     722errno_t async_req_5_3(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5, sysarg_t *r1, sysarg_t *r2, sysarg_t *r3)
     723{
     724        return async_req_slow(exch, imethod, arg1, arg2, arg3, arg4, arg5, r1, r2, r3, NULL, NULL);
     725}
     726
     727errno_t async_req_5_4(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5, sysarg_t *r1, sysarg_t *r2, sysarg_t *r3, sysarg_t *r4)
     728{
     729        return async_req_slow(exch, imethod, arg1, arg2, arg3, arg4, arg5, r1, r2, r3, r4, NULL);
     730}
     731
     732errno_t async_req_5_5(async_exch_t *exch, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5, sysarg_t *r1, sysarg_t *r2, sysarg_t *r3, sysarg_t *r4, sysarg_t *r5)
     733{
     734        return async_req_slow(exch, imethod, arg1, arg2, arg3, arg4, arg5, r1, r2, r3, r4, r5);
    518735}
    519736
     
    9261143 *
    9271144 */
    928 errno_t async_share_in_start(async_exch_t *exch, size_t size, sysarg_t arg,
    929     unsigned int *flags, void **dst)
     1145static errno_t async_share_in_start(async_exch_t *exch, size_t size,
     1146    sysarg_t arg, unsigned int *flags, void **dst)
    9301147{
    9311148        if (exch == NULL)
     
    9431160        *dst = (void *) _dst;
    9441161        return res;
     1162}
     1163
     1164errno_t async_share_in_start_0_0(async_exch_t *exch, size_t size, void **dst)
     1165{
     1166        return async_share_in_start(exch, size, 0, NULL, dst);
     1167}
     1168
     1169errno_t async_share_in_start_0_1(async_exch_t *exch, size_t size,
     1170    unsigned int *flags, void **dst)
     1171{
     1172        return async_share_in_start(exch, size, 0, flags, dst);
     1173}
     1174
     1175errno_t async_share_in_start_1_0(async_exch_t *exch, size_t size, sysarg_t arg,
     1176    void **dst)
     1177{
     1178        return async_share_in_start(exch, size, arg, NULL, dst);
     1179}
     1180
     1181errno_t async_share_in_start_1_1(async_exch_t *exch, size_t size, sysarg_t arg,
     1182    unsigned int *flags, void **dst)
     1183{
     1184        return async_share_in_start(exch, size, arg, flags, dst);
    9451185}
    9461186
Note: See TracChangeset for help on using the changeset viewer.