Changeset 2133e02 in mainline
- Timestamp:
- 2015-08-18T20:14:05Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1a522e5
- Parents:
- 84dc30c
- Location:
- uspace
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/trace/ipcp.c
r84dc30c r2133e02 303 303 (retval == 0)) { 304 304 /* Connected to a service (through NS) */ 305 service = IPC_GET_ARG 1(pcall->question);305 service = IPC_GET_ARG2(pcall->question); 306 306 proto = proto_get_by_srv(service); 307 307 if (proto == NULL) -
uspace/lib/c/generic/clipboard.c
r84dc30c r2133e02 62 62 while (clip_sess == NULL) 63 63 clip_sess = service_connect_blocking(EXCHANGE_SERIALIZE, 64 SERVICE_CLIPBOARD, 0 , 0);64 SERVICE_CLIPBOARD, 0); 65 65 66 66 fibril_mutex_unlock(&clip_mutex); -
uspace/lib/c/generic/devman.c
r84dc30c r2133e02 89 89 if (devman_driver_block_sess == NULL) 90 90 devman_driver_block_sess = 91 service_connect_blocking (EXCHANGE_PARALLEL,92 SERVICE_DEVMAN, DEVMAN_DRIVER, 0);91 service_connect_blocking_iface(EXCHANGE_PARALLEL, 92 DEVMAN_DRIVER, SERVICE_DEVMAN, 0); 93 93 } 94 94 … … 108 108 if (devman_client_block_sess == NULL) 109 109 devman_client_block_sess = 110 service_connect_blocking (EXCHANGE_SERIALIZE,111 SERVICE_DEVMAN, DEVMAN_CLIENT, 0);110 service_connect_blocking_iface(EXCHANGE_SERIALIZE, 111 DEVMAN_CLIENT, SERVICE_DEVMAN, 0); 112 112 } 113 113 … … 138 138 if (devman_driver_sess == NULL) 139 139 devman_driver_sess = 140 service_connect (EXCHANGE_PARALLEL, SERVICE_DEVMAN,141 DEVMAN_DRIVER, 0);140 service_connect_iface(EXCHANGE_PARALLEL, DEVMAN_DRIVER, 141 SERVICE_DEVMAN, 0); 142 142 143 143 fibril_mutex_unlock(&devman_driver_mutex); … … 152 152 if (devman_client_sess == NULL) 153 153 devman_client_sess = 154 service_connect (EXCHANGE_SERIALIZE, SERVICE_DEVMAN,155 DEVMAN_CLIENT, 0);154 service_connect_iface(EXCHANGE_SERIALIZE, DEVMAN_CLIENT, 155 SERVICE_DEVMAN, 0); 156 156 157 157 fibril_mutex_unlock(&devman_client_mutex); … … 293 293 294 294 if (flags & IPC_FLAG_BLOCKING) 295 sess = service_connect_blocking (mgmt, SERVICE_DEVMAN,296 DEVMAN_CONNECT_TO_DEVICE, handle);295 sess = service_connect_blocking_iface(mgmt, DEVMAN_CONNECT_TO_DEVICE, 296 SERVICE_DEVMAN, handle); 297 297 else 298 sess = service_connect (mgmt, SERVICE_DEVMAN,299 DEVMAN_CONNECT_TO_DEVICE, handle);298 sess = service_connect_iface(mgmt, DEVMAN_CONNECT_TO_DEVICE, 299 SERVICE_DEVMAN, handle); 300 300 301 301 return sess; … … 351 351 352 352 if (flags & IPC_FLAG_BLOCKING) 353 sess = service_connect_blocking (mgmt, SERVICE_DEVMAN,354 DEVMAN_CONNECT_TO_PARENTS_DEVICE, handle);353 sess = service_connect_blocking_iface(mgmt, 354 DEVMAN_CONNECT_TO_PARENTS_DEVICE, SERVICE_DEVMAN, handle); 355 355 else 356 sess = service_connect (mgmt, SERVICE_DEVMAN,357 DEVMAN_CONNECT_TO_PARENTS_DEVICE, handle);356 sess = service_connect_iface(mgmt, 357 DEVMAN_CONNECT_TO_PARENTS_DEVICE, SERVICE_DEVMAN, handle); 358 358 359 359 return sess; -
uspace/lib/c/generic/io/log.c
r84dc30c r2133e02 166 166 return ENOMEM; 167 167 168 logger_session = service_connect_blocking(EXCHANGE_SERIALIZE, SERVICE_LOGGER, LOGGER_INTERFACE_WRITER, 0); 168 logger_session = service_connect_blocking_iface(EXCHANGE_SERIALIZE, 169 LOGGER_INTERFACE_WRITER, SERVICE_LOGGER, 0); 169 170 if (logger_session == NULL) { 170 171 return ENOMEM; -
uspace/lib/c/generic/io/logctl.c
r84dc30c r2133e02 48 48 49 49 if (logger_session == NULL) { 50 logger_session = service_connect_blocking (EXCHANGE_SERIALIZE,51 SERVICE_LOGGER, LOGGER_INTERFACE_CONTROL, 0);50 logger_session = service_connect_blocking_iface(EXCHANGE_SERIALIZE, 51 LOGGER_INTERFACE_CONTROL, SERVICE_LOGGER, 0); 52 52 if (logger_session == NULL) 53 53 return ENOMEM; -
uspace/lib/c/generic/irc.c
r84dc30c r2133e02 52 52 53 53 irc_sess = service_connect_blocking(EXCHANGE_SERIALIZE, 54 SERVICE_IRC, 0 , 0);54 SERVICE_IRC, 0); 55 55 56 56 if (irc_sess == NULL) -
uspace/lib/c/generic/loader.c
r84dc30c r2133e02 69 69 70 70 async_sess_t *sess = 71 service_connect_blocking(EXCHANGE_SERIALIZE, SERVICE_LOAD, 0 , 0);71 service_connect_blocking(EXCHANGE_SERIALIZE, SERVICE_LOAD, 0); 72 72 if (sess == NULL) { 73 73 free(ldr); -
uspace/lib/c/generic/loc.c
r84dc30c r2133e02 147 147 if (loc_supp_block_sess == NULL) 148 148 loc_supp_block_sess = 149 service_connect_blocking (EXCHANGE_SERIALIZE,150 SERVICE_LOC, LOC_PORT_SUPPLIER, 0);149 service_connect_blocking_iface(EXCHANGE_SERIALIZE, 150 LOC_PORT_SUPPLIER, SERVICE_LOC, 0); 151 151 } 152 152 … … 166 166 if (loc_cons_block_sess == NULL) 167 167 loc_cons_block_sess = 168 service_connect_blocking (EXCHANGE_SERIALIZE,169 SERVICE_LOC, LOC_PORT_CONSUMER, 0);168 service_connect_blocking_iface(EXCHANGE_SERIALIZE, 169 LOC_PORT_CONSUMER, SERVICE_LOC, 0); 170 170 } 171 171 … … 196 196 if (loc_supplier_sess == NULL) 197 197 loc_supplier_sess = 198 service_connect (EXCHANGE_SERIALIZE, SERVICE_LOC,199 LOC_PORT_SUPPLIER, 0);198 service_connect_iface(EXCHANGE_SERIALIZE, LOC_PORT_SUPPLIER, 199 SERVICE_LOC, 0); 200 200 201 201 fibril_mutex_unlock(&loc_supplier_mutex); … … 210 210 if (loc_consumer_sess == NULL) 211 211 loc_consumer_sess = 212 service_connect (EXCHANGE_SERIALIZE, SERVICE_LOC,213 LOC_PORT_CONSUMER, 0);212 service_connect_iface(EXCHANGE_SERIALIZE, LOC_PORT_CONSUMER, 213 SERVICE_LOC, 0); 214 214 215 215 fibril_mutex_unlock(&loc_consumer_mutex); … … 575 575 576 576 if (flags & IPC_FLAG_BLOCKING) 577 sess = service_connect_blocking (mgmt, SERVICE_LOC,578 LOC_CONNECT_TO_SERVICE, handle);577 sess = service_connect_blocking_iface(mgmt, LOC_CONNECT_TO_SERVICE, 578 SERVICE_LOC, handle); 579 579 else 580 sess = service_connect (mgmt, SERVICE_LOC,581 LOC_CONNECT_TO_SERVICE, handle);580 sess = service_connect_iface(mgmt, LOC_CONNECT_TO_SERVICE, 581 SERVICE_LOC, handle); 582 582 583 583 return sess; -
uspace/lib/c/generic/ns.c
r84dc30c r2133e02 43 43 { 44 44 async_exch_t *exch = async_exchange_begin(session_ns); 45 int rc = async_connect_to_me(exch, service, 0, 0, NULL, NULL);45 int rc = async_connect_to_me(exch, 0, service, 0, NULL, NULL); 46 46 async_exchange_end(exch); 47 47 … … 49 49 } 50 50 51 async_sess_t *service_connect (exch_mgmt_t mgmt, service_t service, sysarg_t arg2,52 s ysarg_t arg3)51 async_sess_t *service_connect_iface(exch_mgmt_t mgmt, sysarg_t iface, 52 service_t service, sysarg_t arg3) 53 53 { 54 54 async_exch_t *exch = async_exchange_begin(session_ns); … … 57 57 58 58 async_sess_t *sess = 59 async_connect_me_to(mgmt, exch, service, arg2, arg3);59 async_connect_me_to(mgmt, exch, iface, service, arg3); 60 60 async_exchange_end(exch); 61 61 … … 68 68 * first argument for non-initial connections. 69 69 */ 70 async_sess_args_set(sess, arg2, arg3, 0);70 async_sess_args_set(sess, iface, arg3, 0); 71 71 72 72 return sess; 73 73 } 74 74 75 async_sess_t *service_connect_blocking(exch_mgmt_t mgmt, service_t service, 76 sysarg_t arg2, sysarg_t arg3) 75 async_sess_t *service_connect(exch_mgmt_t mgmt, service_t service, sysarg_t arg3) 77 76 { 78 77 async_exch_t *exch = async_exchange_begin(session_ns); 79 78 if (!exch) 80 79 return NULL; 80 81 81 async_sess_t *sess = 82 async_connect_me_to _blocking(mgmt, exch, service, arg2, arg3);82 async_connect_me_to(mgmt, exch, 0, service, arg3); 83 83 async_exchange_end(exch); 84 84 … … 91 91 * first argument for non-initial connections. 92 92 */ 93 async_sess_args_set(sess, arg2, arg3, 0); 93 async_sess_args_set(sess, 0, arg3, 0); 94 95 return sess; 96 } 97 98 async_sess_t *service_connect_blocking_iface(exch_mgmt_t mgmt, sysarg_t iface, 99 service_t service, sysarg_t arg3) 100 { 101 async_exch_t *exch = async_exchange_begin(session_ns); 102 if (!exch) 103 return NULL; 104 async_sess_t *sess = 105 async_connect_me_to_blocking(mgmt, exch, iface, service, arg3); 106 async_exchange_end(exch); 107 108 if (!sess) 109 return NULL; 110 111 /* 112 * FIXME Ugly hack to work around limitation of implementing 113 * parallel exchanges using multiple connections. Shift out 114 * first argument for non-initial connections. 115 */ 116 async_sess_args_set(sess, iface, arg3, 0); 117 118 return sess; 119 } 120 121 async_sess_t *service_connect_blocking(exch_mgmt_t mgmt, service_t service, 122 sysarg_t arg3) 123 { 124 async_exch_t *exch = async_exchange_begin(session_ns); 125 if (!exch) 126 return NULL; 127 async_sess_t *sess = 128 async_connect_me_to_blocking(mgmt, exch, 0, service, arg3); 129 async_exchange_end(exch); 130 131 if (!sess) 132 return NULL; 133 134 /* 135 * FIXME Ugly hack to work around limitation of implementing 136 * parallel exchanges using multiple connections. Shift out 137 * first argument for non-initial connections. 138 */ 139 async_sess_args_set(sess, 0, arg3, 0); 94 140 95 141 return sess; … … 113 159 /* Connect to the needed service */ 114 160 async_sess_t *sess = 115 service_connect_blocking(EXCHANGE_SERIALIZE, service, 0 , 0);161 service_connect_blocking(EXCHANGE_SERIALIZE, service, 0); 116 162 if (sess != NULL) { 117 163 /* Request callback connection */ -
uspace/lib/c/generic/vfs/vfs.c
r84dc30c r2133e02 76 76 while (vfs_sess == NULL) 77 77 vfs_sess = service_connect_blocking(EXCHANGE_PARALLEL, SERVICE_VFS, 78 0 , 0);78 0); 79 79 80 80 fibril_mutex_unlock(&vfs_mutex); -
uspace/lib/c/include/ns.h
r84dc30c r2133e02 42 42 43 43 extern int service_register(sysarg_t); 44 extern async_sess_t *service_connect(exch_mgmt_t, service_t, sysarg_t, sysarg_t); 45 extern async_sess_t *service_connect_blocking(exch_mgmt_t, service_t, sysarg_t, 44 extern async_sess_t *service_connect(exch_mgmt_t, service_t, sysarg_t); 45 extern async_sess_t *service_connect_iface(exch_mgmt_t, sysarg_t, service_t, sysarg_t); 46 extern async_sess_t *service_connect_blocking(exch_mgmt_t, service_t, sysarg_t); 47 extern async_sess_t *service_connect_blocking_iface(exch_mgmt_t, sysarg_t, service_t, 46 48 sysarg_t); 47 49 extern async_sess_t *service_bind(service_t, sysarg_t, sysarg_t, sysarg_t, -
uspace/srv/fs/cdfs/cdfs.c
r84dc30c r2133e02 74 74 75 75 async_sess_t *vfs_sess = service_connect_blocking(EXCHANGE_SERIALIZE, 76 SERVICE_VFS, 0 , 0);76 SERVICE_VFS, 0); 77 77 if (!vfs_sess) { 78 78 printf("%s: Unable to connect to VFS\n", NAME); -
uspace/srv/fs/exfat/exfat.c
r84dc30c r2133e02 76 76 77 77 async_sess_t *vfs_sess = service_connect_blocking(EXCHANGE_SERIALIZE, 78 SERVICE_VFS, 0 , 0);78 SERVICE_VFS, 0); 79 79 if (!vfs_sess) { 80 80 printf(NAME ": failed to connect to VFS\n"); -
uspace/srv/fs/ext4fs/ext4fs.c
r84dc30c r2133e02 66 66 67 67 async_sess_t *vfs_sess = service_connect_blocking(EXCHANGE_SERIALIZE, 68 SERVICE_VFS, 0 , 0);68 SERVICE_VFS, 0); 69 69 if (!vfs_sess) { 70 70 printf("%s: Failed to connect to VFS\n", NAME); -
uspace/srv/fs/fat/fat.c
r84dc30c r2133e02 76 76 77 77 async_sess_t *vfs_sess = service_connect_blocking(EXCHANGE_SERIALIZE, 78 SERVICE_VFS, 0 , 0);78 SERVICE_VFS, 0); 79 79 if (!vfs_sess) { 80 80 printf(NAME ": failed to connect to VFS\n"); -
uspace/srv/fs/locfs/locfs.c
r84dc30c r2133e02 78 78 79 79 async_sess_t *vfs_sess = service_connect_blocking(EXCHANGE_SERIALIZE, 80 SERVICE_VFS, 0 , 0);80 SERVICE_VFS, 0); 81 81 if (!vfs_sess) { 82 82 printf("%s: Unable to connect to VFS\n", NAME); -
uspace/srv/fs/mfs/mfs.c
r84dc30c r2133e02 74 74 75 75 async_sess_t *vfs_sess = service_connect_blocking(EXCHANGE_SERIALIZE, 76 SERVICE_VFS, 0 , 0);76 SERVICE_VFS, 0); 77 77 78 78 if (!vfs_sess) { -
uspace/srv/fs/tmpfs/tmpfs.c
r84dc30c r2133e02 81 81 82 82 async_sess_t *vfs_sess = service_connect_blocking(EXCHANGE_SERIALIZE, 83 SERVICE_VFS, 0 , 0);83 SERVICE_VFS, 0); 84 84 if (!vfs_sess) { 85 85 printf(NAME ": Unable to connect to VFS\n"); -
uspace/srv/fs/udf/udf.c
r84dc30c r2133e02 74 74 75 75 async_sess_t *vfs_sess = 76 service_connect_blocking(EXCHANGE_SERIALIZE, SERVICE_VFS, 0 , 0);76 service_connect_blocking(EXCHANGE_SERIALIZE, SERVICE_VFS, 0); 77 77 if (!vfs_sess) { 78 78 log_msg(LOG_DEFAULT, LVL_FATAL, "Failed to connect to VFS"); -
uspace/srv/hid/input/input.c
r84dc30c r2133e02 746 746 while (irc_sess == NULL) 747 747 irc_sess = service_connect_blocking(EXCHANGE_SERIALIZE, 748 SERVICE_IRC, 0 , 0);748 SERVICE_IRC, 0); 749 749 } 750 750 -
uspace/srv/ns/clonable.c
r84dc30c r2133e02 94 94 ipc_answer_0(callid, EOK); 95 95 96 ipc_forward_fast(csr->callid, phone, IPC_GET_ARG 2(csr->call),96 ipc_forward_fast(csr->callid, phone, IPC_GET_ARG1(csr->call), 97 97 IPC_GET_ARG3(csr->call), 0, IPC_FF_NONE); 98 98 -
uspace/srv/ns/ns.c
r84dc30c r2133e02 39 39 #include <ipc/ns.h> 40 40 #include <ipc/services.h> 41 #include <abi/ipc/interfaces.h> 41 42 #include <stdio.h> 42 43 #include <errno.h> … … 74 75 sysarg_t retval; 75 76 77 iface_t iface; 76 78 service_t service; 77 79 sysarg_t phone; … … 82 84 break; 83 85 case IPC_M_CONNECT_TO_ME: 84 service = IPC_GET_ARG1(call); 86 iface = IPC_GET_ARG1(call); 87 service = IPC_GET_ARG2(call); 85 88 phone = IPC_GET_ARG5(call); 89 90 (void) iface; 86 91 87 92 /* … … 96 101 break; 97 102 case IPC_M_CONNECT_ME_TO: 98 service = IPC_GET_ARG1(call); 103 iface = IPC_GET_ARG1(call); 104 service = IPC_GET_ARG2(call); 105 106 (void) iface; 99 107 100 108 /* -
uspace/srv/ns/service.c
r84dc30c r2133e02 39 39 #include "service.h" 40 40 #include "ns.h" 41 42 41 43 42 /** Service hash table item. */ … … 84 83 sysarg_t service; /**< Number of the service. */ 85 84 ipc_callid_t callid; /**< Call ID waiting for the connection */ 86 sysarg_t arg2; /**< Secondargument */85 sysarg_t iface; /**< Interface argument */ 87 86 sysarg_t arg3; /**< Third argument */ 88 87 } pending_conn_t; … … 112 111 113 112 hashed_service_t *hs = hash_table_get_inst(link, hashed_service_t, link); 114 (void) ipc_forward_fast(pr->callid, hs->phone, pr-> arg2,115 pr->arg3, 0,IPC_FF_NONE);113 (void) ipc_forward_fast(pr->callid, hs->phone, pr->iface, pr->arg3, 0, 114 IPC_FF_NONE); 116 115 117 116 list_remove(&pr->link); … … 174 173 pr->service = service; 175 174 pr->callid = callid; 176 pr-> arg2 = IPC_GET_ARG2(*call);175 pr->iface = IPC_GET_ARG1(*call); 177 176 pr->arg3 = IPC_GET_ARG3(*call); 178 177 list_append(&pr->link, &pending_conn); 179 178 return; 180 179 } 180 181 181 retval = ENOENT; 182 182 goto out; … … 184 184 185 185 hashed_service_t *hs = hash_table_get_inst(link, hashed_service_t, link); 186 (void) ipc_forward_fast(callid, hs->phone, IPC_GET_ARG 2(*call),186 (void) ipc_forward_fast(callid, hs->phone, IPC_GET_ARG1(*call), 187 187 IPC_GET_ARG3(*call), 0, IPC_FF_NONE); 188 188 return;
Note:
See TracChangeset
for help on using the changeset viewer.