Changeset a46e56b in mainline for uspace/srv/hid


Ignore:
Timestamp:
2018-03-22T06:49:35Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
77f0a1d
Parents:
3e242d2
git-author:
Jakub Jermar <jakub@…> (2018-03-21 23:29:06)
git-committer:
Jakub Jermar <jakub@…> (2018-03-22 06:49:35)
Message:

Prefer handle over ID in naming handle variables

Location:
uspace/srv/hid
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/compositor/compositor.c

    r3e242d2 ra46e56b  
    589589}
    590590
    591 static void comp_window_get_event(window_t *win, cap_call_handle_t iid, ipc_call_t *icall)
     591static void comp_window_get_event(window_t *win, cap_call_handle_t icall_handle, ipc_call_t *icall)
    592592{
    593593        window_event_t *event = (window_event_t *) prodcons_consume(&win->queue);
    594594
    595         cap_call_handle_t callid;
     595        cap_call_handle_t chandle;
    596596        size_t len;
    597597
    598         if (!async_data_read_receive(&callid, &len)) {
    599                 async_answer_0(iid, EINVAL);
     598        if (!async_data_read_receive(&chandle, &len)) {
     599                async_answer_0(icall_handle, EINVAL);
    600600                free(event);
    601601                return;
    602602        }
    603603
    604         errno_t rc = async_data_read_finalize(callid, event, len);
     604        errno_t rc = async_data_read_finalize(chandle, event, len);
    605605        if (rc != EOK) {
    606                 async_answer_0(iid, ENOMEM);
     606                async_answer_0(icall_handle, ENOMEM);
    607607                free(event);
    608608                return;
    609609        }
    610610
    611         async_answer_0(iid, EOK);
     611        async_answer_0(icall_handle, EOK);
    612612        free(event);
    613613}
    614614
    615 static void comp_window_damage(window_t *win, cap_call_handle_t iid, ipc_call_t *icall)
     615static void comp_window_damage(window_t *win, cap_call_handle_t icall_handle, ipc_call_t *icall)
    616616{
    617617        double x = IPC_GET_ARG1(*icall);
     
    631631        }
    632632
    633         async_answer_0(iid, EOK);
    634 }
    635 
    636 static void comp_window_grab(window_t *win, cap_call_handle_t iid, ipc_call_t *icall)
     633        async_answer_0(icall_handle, EOK);
     634}
     635
     636static void comp_window_grab(window_t *win, cap_call_handle_t icall_handle, ipc_call_t *icall)
    637637{
    638638        sysarg_t pos_id = IPC_GET_ARG1(*icall);
     
    661661        }
    662662
    663         async_answer_0(iid, EOK);
     663        async_answer_0(icall_handle, EOK);
    664664}
    665665
     
    693693}
    694694
    695 static void comp_window_resize(window_t *win, cap_call_handle_t iid, ipc_call_t *icall)
    696 {
    697         cap_call_handle_t callid;
     695static void comp_window_resize(window_t *win, cap_call_handle_t icall_handle, ipc_call_t *icall)
     696{
     697        cap_call_handle_t chandle;
    698698        size_t size;
    699699        unsigned int flags;
    700700
    701701        /* Start sharing resized window with client. */
    702         if (!async_share_out_receive(&callid, &size, &flags)) {
    703                 async_answer_0(iid, EINVAL);
     702        if (!async_share_out_receive(&chandle, &size, &flags)) {
     703                async_answer_0(icall_handle, EINVAL);
    704704                return;
    705705        }
    706706
    707707        void *new_cell_storage;
    708         errno_t rc = async_share_out_finalize(callid, &new_cell_storage);
     708        errno_t rc = async_share_out_finalize(chandle, &new_cell_storage);
    709709        if ((rc != EOK) || (new_cell_storage == AS_MAP_FAILED)) {
    710                 async_answer_0(iid, ENOMEM);
     710                async_answer_0(icall_handle, ENOMEM);
    711711                return;
    712712        }
     
    717717        if (!new_surface) {
    718718                as_area_destroy(new_cell_storage);
    719                 async_answer_0(iid, ENOMEM);
     719                async_answer_0(icall_handle, ENOMEM);
    720720                return;
    721721        }
     
    804804        comp_damage(x, y, width, height);
    805805
    806         async_answer_0(iid, EOK);
     806        async_answer_0(icall_handle, EOK);
    807807}
    808808
     
    836836}
    837837
    838 static void comp_window_close(window_t *win, cap_call_handle_t iid, ipc_call_t *icall)
     838static void comp_window_close(window_t *win, cap_call_handle_t icall_handle, ipc_call_t *icall)
    839839{
    840840        /* Stop managing the window. */
     
    876876
    877877        comp_damage(x, y, width, height);
    878         async_answer_0(iid, EOK);
    879 }
    880 
    881 static void comp_window_close_request(window_t *win, cap_call_handle_t iid, ipc_call_t *icall)
     878        async_answer_0(icall_handle, EOK);
     879}
     880
     881static void comp_window_close_request(window_t *win, cap_call_handle_t icall_handle, ipc_call_t *icall)
    882882{
    883883        window_event_t *event = (window_event_t *) malloc(sizeof(window_event_t));
    884884        if (event == NULL) {
    885                 async_answer_0(iid, ENOMEM);
     885                async_answer_0(icall_handle, ENOMEM);
    886886                return;
    887887        }
     
    891891
    892892        prodcons_produce(&win->queue, &event->link);
    893         async_answer_0(iid, EOK);
    894 }
    895 
    896 static void client_connection(cap_call_handle_t iid, ipc_call_t *icall, void *arg)
     893        async_answer_0(icall_handle, EOK);
     894}
     895
     896static void client_connection(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg)
    897897{
    898898        ipc_call_t call;
    899         cap_call_handle_t callid;
     899        cap_call_handle_t chandle;
    900900        service_id_t service_id = (service_id_t) IPC_GET_ARG2(*icall);
    901901
    902902        /* Allocate resources for new window and register it to the location service. */
    903903        if (service_id == winreg_id) {
    904                 async_answer_0(iid, EOK);
    905 
    906                 callid = async_get_call(&call);
     904                async_answer_0(icall_handle, EOK);
     905
     906                chandle = async_get_call(&call);
    907907                if (IPC_GET_IMETHOD(call) == WINDOW_REGISTER) {
    908908                        fibril_mutex_lock(&window_list_mtx);
     
    910910                        window_t *win = window_create();
    911911                        if (!win) {
    912                                 async_answer_2(callid, ENOMEM, 0, 0);
     912                                async_answer_2(chandle, ENOMEM, 0, 0);
    913913                                fibril_mutex_unlock(&window_list_mtx);
    914914                                return;
     
    929929                        if (loc_service_register(name_in, &win->in_dsid) != EOK) {
    930930                                window_destroy(win);
    931                                 async_answer_2(callid, EINVAL, 0, 0);
     931                                async_answer_2(chandle, EINVAL, 0, 0);
    932932                                fibril_mutex_unlock(&window_list_mtx);
    933933                                return;
     
    937937                                loc_service_unregister(win->in_dsid);
    938938                                window_destroy(win);
    939                                 async_answer_2(callid, EINVAL, 0, 0);
     939                                async_answer_2(chandle, EINVAL, 0, 0);
    940940                                fibril_mutex_unlock(&window_list_mtx);
    941941                                return;
     
    951951                        }
    952952
    953                         async_answer_2(callid, EOK, win->in_dsid, win->out_dsid);
     953                        async_answer_2(chandle, EOK, win->in_dsid, win->out_dsid);
    954954                        fibril_mutex_unlock(&window_list_mtx);
    955955
     
    960960                        return;
    961961                } else {
    962                         async_answer_0(callid, EINVAL);
     962                        async_answer_0(chandle, EINVAL);
    963963                        return;
    964964                }
     
    978978        if (win) {
    979979                atomic_inc(&win->ref_cnt);
    980                 async_answer_0(iid, EOK);
     980                async_answer_0(icall_handle, EOK);
    981981        } else {
    982                 async_answer_0(iid, EINVAL);
     982                async_answer_0(icall_handle, EINVAL);
    983983                return;
    984984        }
     
    987987        if (win->in_dsid == service_id) {
    988988                while (true) {
    989                         callid = async_get_call(&call);
     989                        chandle = async_get_call(&call);
    990990
    991991                        if (!IPC_GET_IMETHOD(call)) {
    992                                 async_answer_0(callid, EOK);
     992                                async_answer_0(chandle, EOK);
    993993                                atomic_dec(&win->ref_cnt);
    994994                                window_destroy(win);
     
    998998                        switch (IPC_GET_IMETHOD(call)) {
    999999                        case WINDOW_GET_EVENT:
    1000                                 comp_window_get_event(win, callid, &call);
     1000                                comp_window_get_event(win, chandle, &call);
    10011001                                break;
    10021002                        default:
    1003                                 async_answer_0(callid, EINVAL);
     1003                                async_answer_0(chandle, EINVAL);
    10041004                        }
    10051005                }
    10061006        } else if (win->out_dsid == service_id) {
    10071007                while (true) {
    1008                         callid = async_get_call(&call);
     1008                        chandle = async_get_call(&call);
    10091009
    10101010                        if (!IPC_GET_IMETHOD(call)) {
    1011                                 comp_window_close(win, callid, &call);
     1011                                comp_window_close(win, chandle, &call);
    10121012                                atomic_dec(&win->ref_cnt);
    10131013                                window_destroy(win);
     
    10171017                        switch (IPC_GET_IMETHOD(call)) {
    10181018                        case WINDOW_DAMAGE:
    1019                                 comp_window_damage(win, callid, &call);
     1019                                comp_window_damage(win, chandle, &call);
    10201020                                break;
    10211021                        case WINDOW_GRAB:
    1022                                 comp_window_grab(win, callid, &call);
     1022                                comp_window_grab(win, chandle, &call);
    10231023                                break;
    10241024                        case WINDOW_RESIZE:
    1025                                 comp_window_resize(win, callid, &call);
     1025                                comp_window_resize(win, chandle, &call);
    10261026                                break;
    10271027                        case WINDOW_CLOSE:
     
    10301030                                 * the case when the client is killed abruptly.
    10311031                                 */
    1032                                 async_answer_0(callid, EOK);
     1032                                async_answer_0(chandle, EOK);
    10331033                                break;
    10341034                        case WINDOW_CLOSE_REQUEST:
    1035                                 comp_window_close_request(win, callid, &call);
     1035                                comp_window_close_request(win, chandle, &call);
    10361036                                break;
    10371037                        default:
    1038                                 async_answer_0(callid, EINVAL);
    1039                         }
    1040                 }
    1041         }
    1042 }
    1043 
    1044 static void comp_mode_change(viewport_t *vp, cap_call_handle_t iid, ipc_call_t *icall)
     1038                                async_answer_0(chandle, EINVAL);
     1039                        }
     1040                }
     1041        }
     1042}
     1043
     1044static void comp_mode_change(viewport_t *vp, cap_call_handle_t icall_handle, ipc_call_t *icall)
    10451045{
    10461046        sysarg_t mode_idx = IPC_GET_ARG2(*icall);
     
    10521052        if (rc != EOK) {
    10531053                fibril_mutex_unlock(&viewport_list_mtx);
    1054                 async_answer_0(iid, EINVAL);
     1054                async_answer_0(icall_handle, EINVAL);
    10551055                return;
    10561056        }
     
    10611061        if (!new_surface) {
    10621062                fibril_mutex_unlock(&viewport_list_mtx);
    1063                 async_answer_0(iid, ENOMEM);
     1063                async_answer_0(icall_handle, ENOMEM);
    10641064                return;
    10651065        }
     
    10711071                surface_destroy(new_surface);
    10721072                fibril_mutex_unlock(&viewport_list_mtx);
    1073                 async_answer_0(iid, rc);
     1073                async_answer_0(icall_handle, rc);
    10741074                return;
    10751075        }
     
    10811081
    10821082        fibril_mutex_unlock(&viewport_list_mtx);
    1083         async_answer_0(iid, EOK);
     1083        async_answer_0(icall_handle, EOK);
    10841084
    10851085        comp_restrict_pointers();
     
    11151115        fibril_mutex_unlock(&window_list_mtx);
    11161116
    1117         async_answer_0(iid, EOK);
     1117        async_answer_0(icall_handle, EOK);
    11181118
    11191119        /* All fibrils of the compositor will terminate soon. */
     
    11211121#endif
    11221122
    1123 static void comp_visualizer_disconnect(viewport_t *vp, cap_call_handle_t iid, ipc_call_t *icall)
     1123static void comp_visualizer_disconnect(viewport_t *vp, cap_call_handle_t icall_handle, ipc_call_t *icall)
    11241124{
    11251125        /* Release viewport resources. */
     
    11311131        fibril_mutex_unlock(&viewport_list_mtx);
    11321132
    1133         async_answer_0(iid, EOK);
     1133        async_answer_0(icall_handle, EOK);
    11341134
    11351135        comp_restrict_pointers();
     
    11371137}
    11381138
    1139 static void vsl_notifications(cap_call_handle_t iid, ipc_call_t *icall, void *arg)
     1139static void vsl_notifications(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg)
    11401140{
    11411141        viewport_t *vp = NULL;
     
    11551155        while (true) {
    11561156                ipc_call_t call;
    1157                 cap_call_handle_t callid = async_get_call(&call);
     1157                cap_call_handle_t chandle = async_get_call(&call);
    11581158
    11591159                if (!IPC_GET_IMETHOD(call)) {
     
    11641164                switch (IPC_GET_IMETHOD(call)) {
    11651165                case VISUALIZER_MODE_CHANGE:
    1166                         comp_mode_change(vp, callid, &call);
     1166                        comp_mode_change(vp, chandle, &call);
    11671167                        break;
    11681168                case VISUALIZER_DISCONNECT:
    1169                         comp_visualizer_disconnect(vp, callid, &call);
     1169                        comp_visualizer_disconnect(vp, chandle, &call);
    11701170                        return;
    11711171                default:
    1172                         async_answer_0(callid, EINVAL);
     1172                        async_answer_0(chandle, EINVAL);
    11731173                }
    11741174        }
  • uspace/srv/hid/console/console.c

    r3e242d2 ra46e56b  
    507507}
    508508
    509 static void client_connection(cap_call_handle_t iid, ipc_call_t *icall, void *arg)
     509static void client_connection(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg)
    510510{
    511511        console_t *cons = NULL;
     
    519519
    520520        if (cons == NULL) {
    521                 async_answer_0(iid, ENOENT);
     521                async_answer_0(icall_handle, ENOENT);
    522522                return;
    523523        }
     
    526526                cons_set_cursor_vis(cons, true);
    527527
    528         con_conn(iid, icall, &cons->srvs);
     528        con_conn(icall_handle, icall, &cons->srvs);
    529529}
    530530
  • uspace/srv/hid/input/ctl/kbdev.c

    r3e242d2 ra46e56b  
    147147}
    148148
    149 static void kbdev_callback_conn(cap_call_handle_t iid, ipc_call_t *icall, void *arg)
     149static void kbdev_callback_conn(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg)
    150150{
    151151        kbdev_t *kbdev;
     
    158158        while (true) {
    159159                ipc_call_t call;
    160                 cap_call_handle_t callid;
     160                cap_call_handle_t chandle;
    161161
    162                 callid = async_get_call(&call);
     162                chandle = async_get_call(&call);
    163163                if (!IPC_GET_IMETHOD(call)) {
    164164                        kbdev_destroy(kbdev);
     
    179179                }
    180180
    181                 async_answer_0(callid, retval);
     181                async_answer_0(chandle, retval);
    182182        }
    183183}
  • uspace/srv/hid/input/input.c

    r3e242d2 ra46e56b  
    320320
    321321/** New client connection */
    322 static void client_connection(cap_call_handle_t iid, ipc_call_t *icall, void *arg)
     322static void client_connection(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg)
    323323{
    324324        client_t *client = (client_t *) async_get_client_data();
    325325        if (client == NULL) {
    326                 async_answer_0(iid, ENOMEM);
     326                async_answer_0(icall_handle, ENOMEM);
    327327                return;
    328328        }
    329329
    330         async_answer_0(iid, EOK);
     330        async_answer_0(icall_handle, EOK);
    331331
    332332        while (true) {
    333333                ipc_call_t call;
    334                 cap_call_handle_t callid = async_get_call(&call);
     334                cap_call_handle_t chandle = async_get_call(&call);
    335335
    336336                if (!IPC_GET_IMETHOD(call)) {
     
    340340                        }
    341341
    342                         async_answer_0(callid, EOK);
     342                        async_answer_0(chandle, EOK);
    343343                        return;
    344344                }
     
    349349                        if (client->sess == NULL) {
    350350                                client->sess = sess;
    351                                 async_answer_0(callid, EOK);
     351                                async_answer_0(chandle, EOK);
    352352                        } else
    353                                 async_answer_0(callid, ELIMIT);
     353                                async_answer_0(chandle, ELIMIT);
    354354                } else {
    355355                        switch (IPC_GET_IMETHOD(call)) {
     
    357357                                active_client = client;
    358358                                client_arbitration();
    359                                 async_answer_0(callid, EOK);
     359                                async_answer_0(chandle, EOK);
    360360                                break;
    361361                        default:
    362                                 async_answer_0(callid, EINVAL);
     362                                async_answer_0(chandle, EINVAL);
    363363                        }
    364364                }
  • uspace/srv/hid/input/proto/mousedev.c

    r3e242d2 ra46e56b  
    7070}
    7171
    72 static void mousedev_callback_conn(cap_call_handle_t iid, ipc_call_t *icall,
     72static void mousedev_callback_conn(cap_call_handle_t icall_handle, ipc_call_t *icall,
    7373    void *arg)
    7474{
     
    7878        while (true) {
    7979                ipc_call_t call;
    80                 cap_call_handle_t callid = async_get_call(&call);
     80                cap_call_handle_t chandle = async_get_call(&call);
    8181
    8282                if (!IPC_GET_IMETHOD(call)) {
     
    110110                }
    111111
    112                 async_answer_0(callid, retval);
     112                async_answer_0(chandle, retval);
    113113        }
    114114}
  • uspace/srv/hid/isdv4_tablet/main.c

    r3e242d2 ra46e56b  
    6363}
    6464
    65 static void mouse_connection(cap_call_handle_t iid, ipc_call_t *icall, void *arg)
    66 {
    67         async_answer_0(iid, EOK);
     65static void mouse_connection(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg)
     66{
     67        async_answer_0(icall_handle, EOK);
    6868
    6969        async_sess_t *sess =
     
    7979        while (true) {
    8080                ipc_call_t call;
    81                 cap_call_handle_t callid = async_get_call(&call);
     81                cap_call_handle_t chandle = async_get_call(&call);
    8282
    8383                if (!IPC_GET_IMETHOD(call))
    8484                        break;
    8585
    86                 async_answer_0(callid, ENOTSUP);
     86                async_answer_0(chandle, ENOTSUP);
    8787        }
    8888}
  • uspace/srv/hid/output/output.c

    r3e242d2 ra46e56b  
    7878}
    7979
    80 static void srv_yield(cap_call_handle_t iid, ipc_call_t *icall)
     80static void srv_yield(cap_call_handle_t icall_handle, ipc_call_t *icall)
    8181{
    8282        errno_t ret = EOK;
     
    9090        }
    9191
    92         async_answer_0(iid, ret);
    93 }
    94 
    95 static void srv_claim(cap_call_handle_t iid, ipc_call_t *icall)
     92        async_answer_0(icall_handle, ret);
     93}
     94
     95static void srv_claim(cap_call_handle_t icall_handle, ipc_call_t *icall)
    9696{
    9797        errno_t ret = EOK;
     
    105105        }
    106106
    107         async_answer_0(iid, ret);
    108 }
    109 
    110 static void srv_get_dimensions(cap_call_handle_t iid, ipc_call_t *icall)
     107        async_answer_0(icall_handle, ret);
     108}
     109
     110static void srv_get_dimensions(cap_call_handle_t icall_handle, ipc_call_t *icall)
    111111{
    112112        sysarg_t cols = MAX_COLS;
     
    118118        }
    119119
    120         async_answer_2(iid, EOK, cols, rows);
    121 }
    122 
    123 static void srv_get_caps(cap_call_handle_t iid, ipc_call_t *icall)
     120        async_answer_2(icall_handle, EOK, cols, rows);
     121}
     122
     123static void srv_get_caps(cap_call_handle_t icall_handle, ipc_call_t *icall)
    124124{
    125125        console_caps_t caps = 0;
     
    131131        }
    132132
    133         async_answer_1(iid, EOK, caps);
    134 }
    135 
    136 static frontbuf_t *resolve_frontbuf(sysarg_t handle, cap_call_handle_t iid)
     133        async_answer_1(icall_handle, EOK, caps);
     134}
     135
     136static frontbuf_t *resolve_frontbuf(sysarg_t handle, cap_call_handle_t icall_handle)
    137137{
    138138        frontbuf_t *frontbuf = NULL;
     
    145145
    146146        if (frontbuf == NULL) {
    147                 async_answer_0(iid, ENOENT);
     147                async_answer_0(icall_handle, ENOENT);
    148148                return NULL;
    149149        }
     
    152152}
    153153
    154 static void srv_frontbuf_create(cap_call_handle_t iid, ipc_call_t *icall)
     154static void srv_frontbuf_create(cap_call_handle_t icall_handle, ipc_call_t *icall)
    155155{
    156156        frontbuf_t *frontbuf = (frontbuf_t *) malloc(sizeof(frontbuf_t));
    157157        if (frontbuf == NULL) {
    158                 async_answer_0(iid, ENOMEM);
     158                async_answer_0(icall_handle, ENOMEM);
    159159                return;
    160160        }
     
    162162        link_initialize(&frontbuf->link);
    163163
    164         cap_call_handle_t callid;
    165         if (!async_share_out_receive(&callid, &frontbuf->size,
     164        cap_call_handle_t chandle;
     165        if (!async_share_out_receive(&chandle, &frontbuf->size,
    166166            &frontbuf->flags)) {
    167167                free(frontbuf);
    168                 async_answer_0(iid, EINVAL);
    169                 return;
    170         }
    171 
    172         errno_t rc = async_share_out_finalize(callid, &frontbuf->data);
     168                async_answer_0(icall_handle, EINVAL);
     169                return;
     170        }
     171
     172        errno_t rc = async_share_out_finalize(chandle, &frontbuf->data);
    173173        if ((rc != EOK) || (frontbuf->data == AS_MAP_FAILED)) {
    174174                free(frontbuf);
    175                 async_answer_0(iid, ENOMEM);
     175                async_answer_0(icall_handle, ENOMEM);
    176176                return;
    177177        }
    178178
    179179        list_append(&frontbuf->link, &frontbufs);
    180         async_answer_1(iid, EOK, (sysarg_t) frontbuf);
    181 }
    182 
    183 static void srv_frontbuf_destroy(cap_call_handle_t iid, ipc_call_t *icall)
    184 {
    185         frontbuf_t *frontbuf = resolve_frontbuf(IPC_GET_ARG1(*icall), iid);
     180        async_answer_1(icall_handle, EOK, (sysarg_t) frontbuf);
     181}
     182
     183static void srv_frontbuf_destroy(cap_call_handle_t icall_handle, ipc_call_t *icall)
     184{
     185        frontbuf_t *frontbuf = resolve_frontbuf(IPC_GET_ARG1(*icall), icall_handle);
    186186        if (frontbuf == NULL)
    187187                return;
     
    191191        free(frontbuf);
    192192
    193         async_answer_0(iid, EOK);
    194 }
    195 
    196 static void srv_cursor_update(cap_call_handle_t iid, ipc_call_t *icall)
    197 {
    198         frontbuf_t *frontbuf = resolve_frontbuf(IPC_GET_ARG1(*icall), iid);
     193        async_answer_0(icall_handle, EOK);
     194}
     195
     196static void srv_cursor_update(cap_call_handle_t icall_handle, ipc_call_t *icall)
     197{
     198        frontbuf_t *frontbuf = resolve_frontbuf(IPC_GET_ARG1(*icall), icall_handle);
    199199        if (frontbuf == NULL)
    200200                return;
     
    223223        }
    224224
    225         async_answer_0(iid, EOK);
    226 }
    227 
    228 static void srv_set_style(cap_call_handle_t iid, ipc_call_t *icall)
     225        async_answer_0(icall_handle, EOK);
     226}
     227
     228static void srv_set_style(cap_call_handle_t icall_handle, ipc_call_t *icall)
    229229{
    230230        list_foreach(outdevs, link, outdev_t, dev) {
     
    234234        }
    235235
    236         async_answer_0(iid, EOK);
    237 }
    238 
    239 static void srv_set_color(cap_call_handle_t iid, ipc_call_t *icall)
     236        async_answer_0(icall_handle, EOK);
     237}
     238
     239static void srv_set_color(cap_call_handle_t icall_handle, ipc_call_t *icall)
    240240{
    241241        list_foreach(outdevs, link, outdev_t, dev) {
     
    249249        }
    250250
    251         async_answer_0(iid, EOK);
    252 }
    253 
    254 static void srv_set_rgb_color(cap_call_handle_t iid, ipc_call_t *icall)
     251        async_answer_0(icall_handle, EOK);
     252}
     253
     254static void srv_set_rgb_color(cap_call_handle_t icall_handle, ipc_call_t *icall)
    255255{
    256256        list_foreach(outdevs, link, outdev_t, dev) {
     
    260260        }
    261261
    262         async_answer_0(iid, EOK);
     262        async_answer_0(icall_handle, EOK);
    263263}
    264264
     
    302302}
    303303
    304 static void srv_update(cap_call_handle_t iid, ipc_call_t *icall)
    305 {
    306         frontbuf_t *frontbuf = resolve_frontbuf(IPC_GET_ARG1(*icall), iid);
     304static void srv_update(cap_call_handle_t icall_handle, ipc_call_t *icall)
     305{
     306        frontbuf_t *frontbuf = resolve_frontbuf(IPC_GET_ARG1(*icall), icall_handle);
    307307        if (frontbuf == NULL)
    308308                return;
     
    349349
    350350
    351         async_answer_0(iid, EOK);
    352 }
    353 
    354 static void srv_damage(cap_call_handle_t iid, ipc_call_t *icall)
    355 {
    356         frontbuf_t *frontbuf = resolve_frontbuf(IPC_GET_ARG1(*icall), iid);
     351        async_answer_0(icall_handle, EOK);
     352}
     353
     354static void srv_damage(cap_call_handle_t icall_handle, ipc_call_t *icall)
     355{
     356        frontbuf_t *frontbuf = resolve_frontbuf(IPC_GET_ARG1(*icall), icall_handle);
    357357        if (frontbuf == NULL)
    358358                return;
     
    388388
    389389        }
    390         async_answer_0(iid, EOK);
    391 }
    392 
    393 static void client_connection(cap_call_handle_t iid, ipc_call_t *icall, void *arg)
     390        async_answer_0(icall_handle, EOK);
     391}
     392
     393static void client_connection(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg)
    394394{
    395395        /* Accept the connection */
    396         async_answer_0(iid, EOK);
     396        async_answer_0(icall_handle, EOK);
    397397
    398398        while (true) {
    399399                ipc_call_t call;
    400                 cap_call_handle_t callid = async_get_call(&call);
     400                cap_call_handle_t chandle = async_get_call(&call);
    401401
    402402                if (!IPC_GET_IMETHOD(call)) {
    403                         async_answer_0(callid, EOK);
     403                        async_answer_0(chandle, EOK);
    404404                        break;
    405405                }
     
    407407                switch (IPC_GET_IMETHOD(call)) {
    408408                case OUTPUT_YIELD:
    409                         srv_yield(callid, &call);
     409                        srv_yield(chandle, &call);
    410410                        break;
    411411                case OUTPUT_CLAIM:
    412                         srv_claim(callid, &call);
     412                        srv_claim(chandle, &call);
    413413                        break;
    414414                case OUTPUT_GET_DIMENSIONS:
    415                         srv_get_dimensions(callid, &call);
     415                        srv_get_dimensions(chandle, &call);
    416416                        break;
    417417                case OUTPUT_GET_CAPS:
    418                         srv_get_caps(callid, &call);
     418                        srv_get_caps(chandle, &call);
    419419                        break;
    420420
    421421                case OUTPUT_FRONTBUF_CREATE:
    422                         srv_frontbuf_create(callid, &call);
     422                        srv_frontbuf_create(chandle, &call);
    423423                        break;
    424424                case OUTPUT_FRONTBUF_DESTROY:
    425                         srv_frontbuf_destroy(callid, &call);
     425                        srv_frontbuf_destroy(chandle, &call);
    426426                        break;
    427427
    428428                case OUTPUT_CURSOR_UPDATE:
    429                         srv_cursor_update(callid, &call);
     429                        srv_cursor_update(chandle, &call);
    430430                        break;
    431431                case OUTPUT_SET_STYLE:
    432                         srv_set_style(callid, &call);
     432                        srv_set_style(chandle, &call);
    433433                        break;
    434434                case OUTPUT_SET_COLOR:
    435                         srv_set_color(callid, &call);
     435                        srv_set_color(chandle, &call);
    436436                        break;
    437437                case OUTPUT_SET_RGB_COLOR:
    438                         srv_set_rgb_color(callid, &call);
     438                        srv_set_rgb_color(chandle, &call);
    439439                        break;
    440440                case OUTPUT_UPDATE:
    441                         srv_update(callid, &call);
     441                        srv_update(chandle, &call);
    442442                        break;
    443443                case OUTPUT_DAMAGE:
    444                         srv_damage(callid, &call);
     444                        srv_damage(chandle, &call);
    445445                        break;
    446446
    447447                default:
    448                         async_answer_0(callid, EINVAL);
     448                        async_answer_0(chandle, EINVAL);
    449449                }
    450450        }
  • uspace/srv/hid/remcons/remcons.c

    r3e242d2 ra46e56b  
    216216
    217217/** Callback when client connects to a telnet terminal. */
    218 static void client_connection(cap_call_handle_t iid, ipc_call_t *icall, void *arg)
     218static void client_connection(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg)
    219219{
    220220        /* Find the user. */
    221221        telnet_user_t *user = telnet_user_get_for_client_connection(IPC_GET_ARG2(*icall));
    222222        if (user == NULL) {
    223                 async_answer_0(iid, ENOENT);
     223                async_answer_0(icall_handle, ENOENT);
    224224                return;
    225225        }
    226226
    227227        /* Handle messages. */
    228         con_conn(iid, icall, &user->srvs);
     228        con_conn(icall_handle, icall, &user->srvs);
    229229}
    230230
  • uspace/srv/hid/rfb/main.c

    r3e242d2 ra46e56b  
    146146}
    147147
    148 static void client_connection(cap_call_handle_t callid, ipc_call_t *call, void *data)
    149 {
    150         graph_visualizer_connection(vis, callid, call, data);
     148static void client_connection(cap_call_handle_t chandle, ipc_call_t *call, void *data)
     149{
     150        graph_visualizer_connection(vis, chandle, call, data);
    151151}
    152152
  • uspace/srv/hid/s3c24xx_ts/s3c24xx_ts.c

    r3e242d2 ra46e56b  
    6969static s3c24xx_ts_t *ts;
    7070
    71 static void s3c24xx_ts_connection(cap_call_handle_t iid, ipc_call_t *icall,
     71static void s3c24xx_ts_connection(cap_call_handle_t icall_handle, ipc_call_t *icall,
    7272    void *arg);
    7373static void s3c24xx_ts_irq_handler(ipc_call_t *call, void *);
     
    373373
    374374/** Handle mouse client connection. */
    375 static void s3c24xx_ts_connection(cap_call_handle_t iid, ipc_call_t *icall,
     375static void s3c24xx_ts_connection(cap_call_handle_t icall_handle, ipc_call_t *icall,
    376376    void *arg)
    377377{
    378         async_answer_0(iid, EOK);
     378        async_answer_0(icall_handle, EOK);
    379379
    380380        while (true) {
    381381                ipc_call_t call;
    382                 cap_call_handle_t callid = async_get_call(&call);
     382                cap_call_handle_t chandle = async_get_call(&call);
    383383
    384384                if (!IPC_GET_IMETHOD(call)) {
     
    388388                        }
    389389
    390                         async_answer_0(callid, EOK);
     390                        async_answer_0(chandle, EOK);
    391391                        return;
    392392                }
     
    397397                        if (ts->client_sess == NULL) {
    398398                                ts->client_sess = sess;
    399                                 async_answer_0(callid, EOK);
     399                                async_answer_0(chandle, EOK);
    400400                        } else
    401                                 async_answer_0(callid, ELIMIT);
     401                                async_answer_0(chandle, ELIMIT);
    402402                } else
    403                         async_answer_0(callid, EINVAL);
     403                        async_answer_0(chandle, EINVAL);
    404404        }
    405405}
Note: See TracChangeset for help on using the changeset viewer.