Changeset a46e56b in mainline for uspace/srv/hid
- Timestamp:
- 2018-03-22T06:49:35Z (8 years ago)
- 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)
- Location:
- uspace/srv/hid
- Files:
-
- 10 edited
-
compositor/compositor.c (modified) (29 diffs)
-
console/console.c (modified) (3 diffs)
-
input/ctl/kbdev.c (modified) (3 diffs)
-
input/input.c (modified) (4 diffs)
-
input/proto/mousedev.c (modified) (3 diffs)
-
isdv4_tablet/main.c (modified) (2 diffs)
-
output/output.c (modified) (17 diffs)
-
remcons/remcons.c (modified) (1 diff)
-
rfb/main.c (modified) (1 diff)
-
s3c24xx_ts/s3c24xx_ts.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/compositor/compositor.c
r3e242d2 ra46e56b 589 589 } 590 590 591 static void comp_window_get_event(window_t *win, cap_call_handle_t i id, ipc_call_t *icall)591 static void comp_window_get_event(window_t *win, cap_call_handle_t icall_handle, ipc_call_t *icall) 592 592 { 593 593 window_event_t *event = (window_event_t *) prodcons_consume(&win->queue); 594 594 595 cap_call_handle_t c allid;595 cap_call_handle_t chandle; 596 596 size_t len; 597 597 598 if (!async_data_read_receive(&c allid, &len)) {599 async_answer_0(i id, EINVAL);598 if (!async_data_read_receive(&chandle, &len)) { 599 async_answer_0(icall_handle, EINVAL); 600 600 free(event); 601 601 return; 602 602 } 603 603 604 errno_t rc = async_data_read_finalize(c allid, event, len);604 errno_t rc = async_data_read_finalize(chandle, event, len); 605 605 if (rc != EOK) { 606 async_answer_0(i id, ENOMEM);606 async_answer_0(icall_handle, ENOMEM); 607 607 free(event); 608 608 return; 609 609 } 610 610 611 async_answer_0(i id, EOK);611 async_answer_0(icall_handle, EOK); 612 612 free(event); 613 613 } 614 614 615 static void comp_window_damage(window_t *win, cap_call_handle_t i id, ipc_call_t *icall)615 static void comp_window_damage(window_t *win, cap_call_handle_t icall_handle, ipc_call_t *icall) 616 616 { 617 617 double x = IPC_GET_ARG1(*icall); … … 631 631 } 632 632 633 async_answer_0(i id, EOK);634 } 635 636 static void comp_window_grab(window_t *win, cap_call_handle_t i id, ipc_call_t *icall)633 async_answer_0(icall_handle, EOK); 634 } 635 636 static void comp_window_grab(window_t *win, cap_call_handle_t icall_handle, ipc_call_t *icall) 637 637 { 638 638 sysarg_t pos_id = IPC_GET_ARG1(*icall); … … 661 661 } 662 662 663 async_answer_0(i id, EOK);663 async_answer_0(icall_handle, EOK); 664 664 } 665 665 … … 693 693 } 694 694 695 static void comp_window_resize(window_t *win, cap_call_handle_t i id, ipc_call_t *icall)696 { 697 cap_call_handle_t c allid;695 static void comp_window_resize(window_t *win, cap_call_handle_t icall_handle, ipc_call_t *icall) 696 { 697 cap_call_handle_t chandle; 698 698 size_t size; 699 699 unsigned int flags; 700 700 701 701 /* Start sharing resized window with client. */ 702 if (!async_share_out_receive(&c allid, &size, &flags)) {703 async_answer_0(i id, EINVAL);702 if (!async_share_out_receive(&chandle, &size, &flags)) { 703 async_answer_0(icall_handle, EINVAL); 704 704 return; 705 705 } 706 706 707 707 void *new_cell_storage; 708 errno_t rc = async_share_out_finalize(c allid, &new_cell_storage);708 errno_t rc = async_share_out_finalize(chandle, &new_cell_storage); 709 709 if ((rc != EOK) || (new_cell_storage == AS_MAP_FAILED)) { 710 async_answer_0(i id, ENOMEM);710 async_answer_0(icall_handle, ENOMEM); 711 711 return; 712 712 } … … 717 717 if (!new_surface) { 718 718 as_area_destroy(new_cell_storage); 719 async_answer_0(i id, ENOMEM);719 async_answer_0(icall_handle, ENOMEM); 720 720 return; 721 721 } … … 804 804 comp_damage(x, y, width, height); 805 805 806 async_answer_0(i id, EOK);806 async_answer_0(icall_handle, EOK); 807 807 } 808 808 … … 836 836 } 837 837 838 static void comp_window_close(window_t *win, cap_call_handle_t i id, ipc_call_t *icall)838 static void comp_window_close(window_t *win, cap_call_handle_t icall_handle, ipc_call_t *icall) 839 839 { 840 840 /* Stop managing the window. */ … … 876 876 877 877 comp_damage(x, y, width, height); 878 async_answer_0(i id, EOK);879 } 880 881 static void comp_window_close_request(window_t *win, cap_call_handle_t i id, ipc_call_t *icall)878 async_answer_0(icall_handle, EOK); 879 } 880 881 static void comp_window_close_request(window_t *win, cap_call_handle_t icall_handle, ipc_call_t *icall) 882 882 { 883 883 window_event_t *event = (window_event_t *) malloc(sizeof(window_event_t)); 884 884 if (event == NULL) { 885 async_answer_0(i id, ENOMEM);885 async_answer_0(icall_handle, ENOMEM); 886 886 return; 887 887 } … … 891 891 892 892 prodcons_produce(&win->queue, &event->link); 893 async_answer_0(i id, EOK);894 } 895 896 static void client_connection(cap_call_handle_t i id, ipc_call_t *icall, void *arg)893 async_answer_0(icall_handle, EOK); 894 } 895 896 static void client_connection(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg) 897 897 { 898 898 ipc_call_t call; 899 cap_call_handle_t c allid;899 cap_call_handle_t chandle; 900 900 service_id_t service_id = (service_id_t) IPC_GET_ARG2(*icall); 901 901 902 902 /* Allocate resources for new window and register it to the location service. */ 903 903 if (service_id == winreg_id) { 904 async_answer_0(i id, EOK);905 906 c allid= async_get_call(&call);904 async_answer_0(icall_handle, EOK); 905 906 chandle = async_get_call(&call); 907 907 if (IPC_GET_IMETHOD(call) == WINDOW_REGISTER) { 908 908 fibril_mutex_lock(&window_list_mtx); … … 910 910 window_t *win = window_create(); 911 911 if (!win) { 912 async_answer_2(c allid, ENOMEM, 0, 0);912 async_answer_2(chandle, ENOMEM, 0, 0); 913 913 fibril_mutex_unlock(&window_list_mtx); 914 914 return; … … 929 929 if (loc_service_register(name_in, &win->in_dsid) != EOK) { 930 930 window_destroy(win); 931 async_answer_2(c allid, EINVAL, 0, 0);931 async_answer_2(chandle, EINVAL, 0, 0); 932 932 fibril_mutex_unlock(&window_list_mtx); 933 933 return; … … 937 937 loc_service_unregister(win->in_dsid); 938 938 window_destroy(win); 939 async_answer_2(c allid, EINVAL, 0, 0);939 async_answer_2(chandle, EINVAL, 0, 0); 940 940 fibril_mutex_unlock(&window_list_mtx); 941 941 return; … … 951 951 } 952 952 953 async_answer_2(c allid, EOK, win->in_dsid, win->out_dsid);953 async_answer_2(chandle, EOK, win->in_dsid, win->out_dsid); 954 954 fibril_mutex_unlock(&window_list_mtx); 955 955 … … 960 960 return; 961 961 } else { 962 async_answer_0(c allid, EINVAL);962 async_answer_0(chandle, EINVAL); 963 963 return; 964 964 } … … 978 978 if (win) { 979 979 atomic_inc(&win->ref_cnt); 980 async_answer_0(i id, EOK);980 async_answer_0(icall_handle, EOK); 981 981 } else { 982 async_answer_0(i id, EINVAL);982 async_answer_0(icall_handle, EINVAL); 983 983 return; 984 984 } … … 987 987 if (win->in_dsid == service_id) { 988 988 while (true) { 989 c allid= async_get_call(&call);989 chandle = async_get_call(&call); 990 990 991 991 if (!IPC_GET_IMETHOD(call)) { 992 async_answer_0(c allid, EOK);992 async_answer_0(chandle, EOK); 993 993 atomic_dec(&win->ref_cnt); 994 994 window_destroy(win); … … 998 998 switch (IPC_GET_IMETHOD(call)) { 999 999 case WINDOW_GET_EVENT: 1000 comp_window_get_event(win, c allid, &call);1000 comp_window_get_event(win, chandle, &call); 1001 1001 break; 1002 1002 default: 1003 async_answer_0(c allid, EINVAL);1003 async_answer_0(chandle, EINVAL); 1004 1004 } 1005 1005 } 1006 1006 } else if (win->out_dsid == service_id) { 1007 1007 while (true) { 1008 c allid= async_get_call(&call);1008 chandle = async_get_call(&call); 1009 1009 1010 1010 if (!IPC_GET_IMETHOD(call)) { 1011 comp_window_close(win, c allid, &call);1011 comp_window_close(win, chandle, &call); 1012 1012 atomic_dec(&win->ref_cnt); 1013 1013 window_destroy(win); … … 1017 1017 switch (IPC_GET_IMETHOD(call)) { 1018 1018 case WINDOW_DAMAGE: 1019 comp_window_damage(win, c allid, &call);1019 comp_window_damage(win, chandle, &call); 1020 1020 break; 1021 1021 case WINDOW_GRAB: 1022 comp_window_grab(win, c allid, &call);1022 comp_window_grab(win, chandle, &call); 1023 1023 break; 1024 1024 case WINDOW_RESIZE: 1025 comp_window_resize(win, c allid, &call);1025 comp_window_resize(win, chandle, &call); 1026 1026 break; 1027 1027 case WINDOW_CLOSE: … … 1030 1030 * the case when the client is killed abruptly. 1031 1031 */ 1032 async_answer_0(c allid, EOK);1032 async_answer_0(chandle, EOK); 1033 1033 break; 1034 1034 case WINDOW_CLOSE_REQUEST: 1035 comp_window_close_request(win, c allid, &call);1035 comp_window_close_request(win, chandle, &call); 1036 1036 break; 1037 1037 default: 1038 async_answer_0(c allid, EINVAL);1039 } 1040 } 1041 } 1042 } 1043 1044 static void comp_mode_change(viewport_t *vp, cap_call_handle_t i id, ipc_call_t *icall)1038 async_answer_0(chandle, EINVAL); 1039 } 1040 } 1041 } 1042 } 1043 1044 static void comp_mode_change(viewport_t *vp, cap_call_handle_t icall_handle, ipc_call_t *icall) 1045 1045 { 1046 1046 sysarg_t mode_idx = IPC_GET_ARG2(*icall); … … 1052 1052 if (rc != EOK) { 1053 1053 fibril_mutex_unlock(&viewport_list_mtx); 1054 async_answer_0(i id, EINVAL);1054 async_answer_0(icall_handle, EINVAL); 1055 1055 return; 1056 1056 } … … 1061 1061 if (!new_surface) { 1062 1062 fibril_mutex_unlock(&viewport_list_mtx); 1063 async_answer_0(i id, ENOMEM);1063 async_answer_0(icall_handle, ENOMEM); 1064 1064 return; 1065 1065 } … … 1071 1071 surface_destroy(new_surface); 1072 1072 fibril_mutex_unlock(&viewport_list_mtx); 1073 async_answer_0(i id, rc);1073 async_answer_0(icall_handle, rc); 1074 1074 return; 1075 1075 } … … 1081 1081 1082 1082 fibril_mutex_unlock(&viewport_list_mtx); 1083 async_answer_0(i id, EOK);1083 async_answer_0(icall_handle, EOK); 1084 1084 1085 1085 comp_restrict_pointers(); … … 1115 1115 fibril_mutex_unlock(&window_list_mtx); 1116 1116 1117 async_answer_0(i id, EOK);1117 async_answer_0(icall_handle, EOK); 1118 1118 1119 1119 /* All fibrils of the compositor will terminate soon. */ … … 1121 1121 #endif 1122 1122 1123 static void comp_visualizer_disconnect(viewport_t *vp, cap_call_handle_t i id, ipc_call_t *icall)1123 static void comp_visualizer_disconnect(viewport_t *vp, cap_call_handle_t icall_handle, ipc_call_t *icall) 1124 1124 { 1125 1125 /* Release viewport resources. */ … … 1131 1131 fibril_mutex_unlock(&viewport_list_mtx); 1132 1132 1133 async_answer_0(i id, EOK);1133 async_answer_0(icall_handle, EOK); 1134 1134 1135 1135 comp_restrict_pointers(); … … 1137 1137 } 1138 1138 1139 static void vsl_notifications(cap_call_handle_t i id, ipc_call_t *icall, void *arg)1139 static void vsl_notifications(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg) 1140 1140 { 1141 1141 viewport_t *vp = NULL; … … 1155 1155 while (true) { 1156 1156 ipc_call_t call; 1157 cap_call_handle_t c allid= async_get_call(&call);1157 cap_call_handle_t chandle = async_get_call(&call); 1158 1158 1159 1159 if (!IPC_GET_IMETHOD(call)) { … … 1164 1164 switch (IPC_GET_IMETHOD(call)) { 1165 1165 case VISUALIZER_MODE_CHANGE: 1166 comp_mode_change(vp, c allid, &call);1166 comp_mode_change(vp, chandle, &call); 1167 1167 break; 1168 1168 case VISUALIZER_DISCONNECT: 1169 comp_visualizer_disconnect(vp, c allid, &call);1169 comp_visualizer_disconnect(vp, chandle, &call); 1170 1170 return; 1171 1171 default: 1172 async_answer_0(c allid, EINVAL);1172 async_answer_0(chandle, EINVAL); 1173 1173 } 1174 1174 } -
uspace/srv/hid/console/console.c
r3e242d2 ra46e56b 507 507 } 508 508 509 static void client_connection(cap_call_handle_t i id, ipc_call_t *icall, void *arg)509 static void client_connection(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg) 510 510 { 511 511 console_t *cons = NULL; … … 519 519 520 520 if (cons == NULL) { 521 async_answer_0(i id, ENOENT);521 async_answer_0(icall_handle, ENOENT); 522 522 return; 523 523 } … … 526 526 cons_set_cursor_vis(cons, true); 527 527 528 con_conn(i id, icall, &cons->srvs);528 con_conn(icall_handle, icall, &cons->srvs); 529 529 } 530 530 -
uspace/srv/hid/input/ctl/kbdev.c
r3e242d2 ra46e56b 147 147 } 148 148 149 static void kbdev_callback_conn(cap_call_handle_t i id, ipc_call_t *icall, void *arg)149 static void kbdev_callback_conn(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg) 150 150 { 151 151 kbdev_t *kbdev; … … 158 158 while (true) { 159 159 ipc_call_t call; 160 cap_call_handle_t c allid;160 cap_call_handle_t chandle; 161 161 162 c allid= async_get_call(&call);162 chandle = async_get_call(&call); 163 163 if (!IPC_GET_IMETHOD(call)) { 164 164 kbdev_destroy(kbdev); … … 179 179 } 180 180 181 async_answer_0(c allid, retval);181 async_answer_0(chandle, retval); 182 182 } 183 183 } -
uspace/srv/hid/input/input.c
r3e242d2 ra46e56b 320 320 321 321 /** New client connection */ 322 static void client_connection(cap_call_handle_t i id, ipc_call_t *icall, void *arg)322 static void client_connection(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg) 323 323 { 324 324 client_t *client = (client_t *) async_get_client_data(); 325 325 if (client == NULL) { 326 async_answer_0(i id, ENOMEM);326 async_answer_0(icall_handle, ENOMEM); 327 327 return; 328 328 } 329 329 330 async_answer_0(i id, EOK);330 async_answer_0(icall_handle, EOK); 331 331 332 332 while (true) { 333 333 ipc_call_t call; 334 cap_call_handle_t c allid= async_get_call(&call);334 cap_call_handle_t chandle = async_get_call(&call); 335 335 336 336 if (!IPC_GET_IMETHOD(call)) { … … 340 340 } 341 341 342 async_answer_0(c allid, EOK);342 async_answer_0(chandle, EOK); 343 343 return; 344 344 } … … 349 349 if (client->sess == NULL) { 350 350 client->sess = sess; 351 async_answer_0(c allid, EOK);351 async_answer_0(chandle, EOK); 352 352 } else 353 async_answer_0(c allid, ELIMIT);353 async_answer_0(chandle, ELIMIT); 354 354 } else { 355 355 switch (IPC_GET_IMETHOD(call)) { … … 357 357 active_client = client; 358 358 client_arbitration(); 359 async_answer_0(c allid, EOK);359 async_answer_0(chandle, EOK); 360 360 break; 361 361 default: 362 async_answer_0(c allid, EINVAL);362 async_answer_0(chandle, EINVAL); 363 363 } 364 364 } -
uspace/srv/hid/input/proto/mousedev.c
r3e242d2 ra46e56b 70 70 } 71 71 72 static void mousedev_callback_conn(cap_call_handle_t i id, ipc_call_t *icall,72 static void mousedev_callback_conn(cap_call_handle_t icall_handle, ipc_call_t *icall, 73 73 void *arg) 74 74 { … … 78 78 while (true) { 79 79 ipc_call_t call; 80 cap_call_handle_t c allid= async_get_call(&call);80 cap_call_handle_t chandle = async_get_call(&call); 81 81 82 82 if (!IPC_GET_IMETHOD(call)) { … … 110 110 } 111 111 112 async_answer_0(c allid, retval);112 async_answer_0(chandle, retval); 113 113 } 114 114 } -
uspace/srv/hid/isdv4_tablet/main.c
r3e242d2 ra46e56b 63 63 } 64 64 65 static void mouse_connection(cap_call_handle_t i id, ipc_call_t *icall, void *arg)66 { 67 async_answer_0(i id, EOK);65 static void mouse_connection(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg) 66 { 67 async_answer_0(icall_handle, EOK); 68 68 69 69 async_sess_t *sess = … … 79 79 while (true) { 80 80 ipc_call_t call; 81 cap_call_handle_t c allid= async_get_call(&call);81 cap_call_handle_t chandle = async_get_call(&call); 82 82 83 83 if (!IPC_GET_IMETHOD(call)) 84 84 break; 85 85 86 async_answer_0(c allid, ENOTSUP);86 async_answer_0(chandle, ENOTSUP); 87 87 } 88 88 } -
uspace/srv/hid/output/output.c
r3e242d2 ra46e56b 78 78 } 79 79 80 static void srv_yield(cap_call_handle_t i id, ipc_call_t *icall)80 static void srv_yield(cap_call_handle_t icall_handle, ipc_call_t *icall) 81 81 { 82 82 errno_t ret = EOK; … … 90 90 } 91 91 92 async_answer_0(i id, ret);93 } 94 95 static void srv_claim(cap_call_handle_t i id, ipc_call_t *icall)92 async_answer_0(icall_handle, ret); 93 } 94 95 static void srv_claim(cap_call_handle_t icall_handle, ipc_call_t *icall) 96 96 { 97 97 errno_t ret = EOK; … … 105 105 } 106 106 107 async_answer_0(i id, ret);108 } 109 110 static void srv_get_dimensions(cap_call_handle_t i id, ipc_call_t *icall)107 async_answer_0(icall_handle, ret); 108 } 109 110 static void srv_get_dimensions(cap_call_handle_t icall_handle, ipc_call_t *icall) 111 111 { 112 112 sysarg_t cols = MAX_COLS; … … 118 118 } 119 119 120 async_answer_2(i id, EOK, cols, rows);121 } 122 123 static void srv_get_caps(cap_call_handle_t i id, ipc_call_t *icall)120 async_answer_2(icall_handle, EOK, cols, rows); 121 } 122 123 static void srv_get_caps(cap_call_handle_t icall_handle, ipc_call_t *icall) 124 124 { 125 125 console_caps_t caps = 0; … … 131 131 } 132 132 133 async_answer_1(i id, EOK, caps);134 } 135 136 static frontbuf_t *resolve_frontbuf(sysarg_t handle, cap_call_handle_t i id)133 async_answer_1(icall_handle, EOK, caps); 134 } 135 136 static frontbuf_t *resolve_frontbuf(sysarg_t handle, cap_call_handle_t icall_handle) 137 137 { 138 138 frontbuf_t *frontbuf = NULL; … … 145 145 146 146 if (frontbuf == NULL) { 147 async_answer_0(i id, ENOENT);147 async_answer_0(icall_handle, ENOENT); 148 148 return NULL; 149 149 } … … 152 152 } 153 153 154 static void srv_frontbuf_create(cap_call_handle_t i id, ipc_call_t *icall)154 static void srv_frontbuf_create(cap_call_handle_t icall_handle, ipc_call_t *icall) 155 155 { 156 156 frontbuf_t *frontbuf = (frontbuf_t *) malloc(sizeof(frontbuf_t)); 157 157 if (frontbuf == NULL) { 158 async_answer_0(i id, ENOMEM);158 async_answer_0(icall_handle, ENOMEM); 159 159 return; 160 160 } … … 162 162 link_initialize(&frontbuf->link); 163 163 164 cap_call_handle_t c allid;165 if (!async_share_out_receive(&c allid, &frontbuf->size,164 cap_call_handle_t chandle; 165 if (!async_share_out_receive(&chandle, &frontbuf->size, 166 166 &frontbuf->flags)) { 167 167 free(frontbuf); 168 async_answer_0(i id, EINVAL);169 return; 170 } 171 172 errno_t rc = async_share_out_finalize(c allid, &frontbuf->data);168 async_answer_0(icall_handle, EINVAL); 169 return; 170 } 171 172 errno_t rc = async_share_out_finalize(chandle, &frontbuf->data); 173 173 if ((rc != EOK) || (frontbuf->data == AS_MAP_FAILED)) { 174 174 free(frontbuf); 175 async_answer_0(i id, ENOMEM);175 async_answer_0(icall_handle, ENOMEM); 176 176 return; 177 177 } 178 178 179 179 list_append(&frontbuf->link, &frontbufs); 180 async_answer_1(i id, EOK, (sysarg_t) frontbuf);181 } 182 183 static void srv_frontbuf_destroy(cap_call_handle_t i id, ipc_call_t *icall)184 { 185 frontbuf_t *frontbuf = resolve_frontbuf(IPC_GET_ARG1(*icall), i id);180 async_answer_1(icall_handle, EOK, (sysarg_t) frontbuf); 181 } 182 183 static 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); 186 186 if (frontbuf == NULL) 187 187 return; … … 191 191 free(frontbuf); 192 192 193 async_answer_0(i id, EOK);194 } 195 196 static void srv_cursor_update(cap_call_handle_t i id, ipc_call_t *icall)197 { 198 frontbuf_t *frontbuf = resolve_frontbuf(IPC_GET_ARG1(*icall), i id);193 async_answer_0(icall_handle, EOK); 194 } 195 196 static 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); 199 199 if (frontbuf == NULL) 200 200 return; … … 223 223 } 224 224 225 async_answer_0(i id, EOK);226 } 227 228 static void srv_set_style(cap_call_handle_t i id, ipc_call_t *icall)225 async_answer_0(icall_handle, EOK); 226 } 227 228 static void srv_set_style(cap_call_handle_t icall_handle, ipc_call_t *icall) 229 229 { 230 230 list_foreach(outdevs, link, outdev_t, dev) { … … 234 234 } 235 235 236 async_answer_0(i id, EOK);237 } 238 239 static void srv_set_color(cap_call_handle_t i id, ipc_call_t *icall)236 async_answer_0(icall_handle, EOK); 237 } 238 239 static void srv_set_color(cap_call_handle_t icall_handle, ipc_call_t *icall) 240 240 { 241 241 list_foreach(outdevs, link, outdev_t, dev) { … … 249 249 } 250 250 251 async_answer_0(i id, EOK);252 } 253 254 static void srv_set_rgb_color(cap_call_handle_t i id, ipc_call_t *icall)251 async_answer_0(icall_handle, EOK); 252 } 253 254 static void srv_set_rgb_color(cap_call_handle_t icall_handle, ipc_call_t *icall) 255 255 { 256 256 list_foreach(outdevs, link, outdev_t, dev) { … … 260 260 } 261 261 262 async_answer_0(i id, EOK);262 async_answer_0(icall_handle, EOK); 263 263 } 264 264 … … 302 302 } 303 303 304 static void srv_update(cap_call_handle_t i id, ipc_call_t *icall)305 { 306 frontbuf_t *frontbuf = resolve_frontbuf(IPC_GET_ARG1(*icall), i id);304 static 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); 307 307 if (frontbuf == NULL) 308 308 return; … … 349 349 350 350 351 async_answer_0(i id, EOK);352 } 353 354 static void srv_damage(cap_call_handle_t i id, ipc_call_t *icall)355 { 356 frontbuf_t *frontbuf = resolve_frontbuf(IPC_GET_ARG1(*icall), i id);351 async_answer_0(icall_handle, EOK); 352 } 353 354 static 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); 357 357 if (frontbuf == NULL) 358 358 return; … … 388 388 389 389 } 390 async_answer_0(i id, EOK);391 } 392 393 static void client_connection(cap_call_handle_t i id, ipc_call_t *icall, void *arg)390 async_answer_0(icall_handle, EOK); 391 } 392 393 static void client_connection(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg) 394 394 { 395 395 /* Accept the connection */ 396 async_answer_0(i id, EOK);396 async_answer_0(icall_handle, EOK); 397 397 398 398 while (true) { 399 399 ipc_call_t call; 400 cap_call_handle_t c allid= async_get_call(&call);400 cap_call_handle_t chandle = async_get_call(&call); 401 401 402 402 if (!IPC_GET_IMETHOD(call)) { 403 async_answer_0(c allid, EOK);403 async_answer_0(chandle, EOK); 404 404 break; 405 405 } … … 407 407 switch (IPC_GET_IMETHOD(call)) { 408 408 case OUTPUT_YIELD: 409 srv_yield(c allid, &call);409 srv_yield(chandle, &call); 410 410 break; 411 411 case OUTPUT_CLAIM: 412 srv_claim(c allid, &call);412 srv_claim(chandle, &call); 413 413 break; 414 414 case OUTPUT_GET_DIMENSIONS: 415 srv_get_dimensions(c allid, &call);415 srv_get_dimensions(chandle, &call); 416 416 break; 417 417 case OUTPUT_GET_CAPS: 418 srv_get_caps(c allid, &call);418 srv_get_caps(chandle, &call); 419 419 break; 420 420 421 421 case OUTPUT_FRONTBUF_CREATE: 422 srv_frontbuf_create(c allid, &call);422 srv_frontbuf_create(chandle, &call); 423 423 break; 424 424 case OUTPUT_FRONTBUF_DESTROY: 425 srv_frontbuf_destroy(c allid, &call);425 srv_frontbuf_destroy(chandle, &call); 426 426 break; 427 427 428 428 case OUTPUT_CURSOR_UPDATE: 429 srv_cursor_update(c allid, &call);429 srv_cursor_update(chandle, &call); 430 430 break; 431 431 case OUTPUT_SET_STYLE: 432 srv_set_style(c allid, &call);432 srv_set_style(chandle, &call); 433 433 break; 434 434 case OUTPUT_SET_COLOR: 435 srv_set_color(c allid, &call);435 srv_set_color(chandle, &call); 436 436 break; 437 437 case OUTPUT_SET_RGB_COLOR: 438 srv_set_rgb_color(c allid, &call);438 srv_set_rgb_color(chandle, &call); 439 439 break; 440 440 case OUTPUT_UPDATE: 441 srv_update(c allid, &call);441 srv_update(chandle, &call); 442 442 break; 443 443 case OUTPUT_DAMAGE: 444 srv_damage(c allid, &call);444 srv_damage(chandle, &call); 445 445 break; 446 446 447 447 default: 448 async_answer_0(c allid, EINVAL);448 async_answer_0(chandle, EINVAL); 449 449 } 450 450 } -
uspace/srv/hid/remcons/remcons.c
r3e242d2 ra46e56b 216 216 217 217 /** Callback when client connects to a telnet terminal. */ 218 static void client_connection(cap_call_handle_t i id, ipc_call_t *icall, void *arg)218 static void client_connection(cap_call_handle_t icall_handle, ipc_call_t *icall, void *arg) 219 219 { 220 220 /* Find the user. */ 221 221 telnet_user_t *user = telnet_user_get_for_client_connection(IPC_GET_ARG2(*icall)); 222 222 if (user == NULL) { 223 async_answer_0(i id, ENOENT);223 async_answer_0(icall_handle, ENOENT); 224 224 return; 225 225 } 226 226 227 227 /* Handle messages. */ 228 con_conn(i id, icall, &user->srvs);228 con_conn(icall_handle, icall, &user->srvs); 229 229 } 230 230 -
uspace/srv/hid/rfb/main.c
r3e242d2 ra46e56b 146 146 } 147 147 148 static void client_connection(cap_call_handle_t c allid, ipc_call_t *call, void *data)149 { 150 graph_visualizer_connection(vis, c allid, call, data);148 static void client_connection(cap_call_handle_t chandle, ipc_call_t *call, void *data) 149 { 150 graph_visualizer_connection(vis, chandle, call, data); 151 151 } 152 152 -
uspace/srv/hid/s3c24xx_ts/s3c24xx_ts.c
r3e242d2 ra46e56b 69 69 static s3c24xx_ts_t *ts; 70 70 71 static void s3c24xx_ts_connection(cap_call_handle_t i id, ipc_call_t *icall,71 static void s3c24xx_ts_connection(cap_call_handle_t icall_handle, ipc_call_t *icall, 72 72 void *arg); 73 73 static void s3c24xx_ts_irq_handler(ipc_call_t *call, void *); … … 373 373 374 374 /** Handle mouse client connection. */ 375 static void s3c24xx_ts_connection(cap_call_handle_t i id, ipc_call_t *icall,375 static void s3c24xx_ts_connection(cap_call_handle_t icall_handle, ipc_call_t *icall, 376 376 void *arg) 377 377 { 378 async_answer_0(i id, EOK);378 async_answer_0(icall_handle, EOK); 379 379 380 380 while (true) { 381 381 ipc_call_t call; 382 cap_call_handle_t c allid= async_get_call(&call);382 cap_call_handle_t chandle = async_get_call(&call); 383 383 384 384 if (!IPC_GET_IMETHOD(call)) { … … 388 388 } 389 389 390 async_answer_0(c allid, EOK);390 async_answer_0(chandle, EOK); 391 391 return; 392 392 } … … 397 397 if (ts->client_sess == NULL) { 398 398 ts->client_sess = sess; 399 async_answer_0(c allid, EOK);399 async_answer_0(chandle, EOK); 400 400 } else 401 async_answer_0(c allid, ELIMIT);401 async_answer_0(chandle, ELIMIT); 402 402 } else 403 async_answer_0(c allid, EINVAL);403 async_answer_0(chandle, EINVAL); 404 404 } 405 405 }
Note:
See TracChangeset
for help on using the changeset viewer.
