Changeset 0dd16778 in mainline
- Timestamp:
- 2015-08-22T14:32:11Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f9b2cb4c
- Parents:
- 78bb04b
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
abi/include/abi/ipc/interfaces.h
r78bb04b r0dd16778 81 81 INTERFACE_LOADER = 82 82 FOURCC_COMPACT('l', 'o', 'a', 'd') | IFACE_EXCHANGE_PARALLEL, 83 INTERFACE_DDF_CLIENT = 84 FOURCC_COMPACT('d', 'd', 'f', 'c') | IFACE_EXCHANGE_SERIALIZE, 83 85 INTERFACE_TCP_CB = 84 86 FOURCC_COMPACT('t', 'c', 'p', ' ') | IFACE_EXCHANGE_SERIALIZE | IFACE_MOD_CALLBACK, -
uspace/app/barber/barber.c
r78bb04b r0dd16778 267 267 link_initialize(&dev->link); 268 268 dev->svc_id = svcs[i]; 269 dev->sess = loc_service_connect (EXCHANGE_SERIALIZE, svcs[i], 0);269 dev->sess = loc_service_connect_iface(svcs[i], INTERFACE_DDF_CLIENT, 0); 270 270 271 271 list_append(&dev->link, &led_devs); -
uspace/lib/c/generic/async.c
r78bb04b r0dd16778 2272 2272 sess->phone = phone; 2273 2273 sess->arg1 = arg1; 2274 sess->arg2 = arg2; 2275 sess->arg3 = arg3; 2276 2277 fibril_mutex_initialize(&sess->remote_state_mtx); 2278 sess->remote_state_data = NULL; 2279 2280 list_initialize(&sess->exch_list); 2281 fibril_mutex_initialize(&sess->mutex); 2282 atomic_set(&sess->refcnt, 0); 2283 2284 return sess; 2285 } 2286 2287 /** Wrapper for making IPC_M_CONNECT_ME_TO calls using the async framework. 2288 * 2289 * Ask through phone for a new connection to some service and block until 2290 * success. 2291 * 2292 * @param exch Exchange for sending the message. 2293 * @param iface Connection interface. 2294 * @param arg2 User defined argument. 2295 * @param arg3 User defined argument. 2296 * 2297 * @return New session on success or NULL on error. 2298 * 2299 */ 2300 async_sess_t *async_connect_me_to_iface(async_exch_t *exch, iface_t iface, 2301 sysarg_t arg2, sysarg_t arg3) 2302 { 2303 if (exch == NULL) { 2304 errno = ENOENT; 2305 return NULL; 2306 } 2307 2308 async_sess_t *sess = (async_sess_t *) malloc(sizeof(async_sess_t)); 2309 if (sess == NULL) { 2310 errno = ENOMEM; 2311 return NULL; 2312 } 2313 2314 int phone = async_connect_me_to_internal(exch->phone, iface, arg2, 2315 arg3, 0); 2316 if (phone < 0) { 2317 errno = phone; 2318 free(sess); 2319 return NULL; 2320 } 2321 2322 sess->iface = iface; 2323 sess->phone = phone; 2324 sess->arg1 = iface; 2274 2325 sess->arg2 = arg2; 2275 2326 sess->arg3 = arg3; -
uspace/lib/c/generic/loc.c
r78bb04b r0dd16778 569 569 } 570 570 571 async_sess_t *loc_service_connect_iface(service_id_t handle, iface_t iface, 572 unsigned int flags) 573 { 574 async_sess_t *sess; 575 576 if (flags & IPC_FLAG_BLOCKING) 577 sess = service_connect_blocking_iface_extended(SERVICE_LOC, iface, handle); 578 else 579 sess = service_connect_iface_extended(SERVICE_LOC, iface, handle); 580 581 return sess; 582 } 583 571 584 async_sess_t *loc_service_connect(exch_mgmt_t mgmt, service_id_t handle, 572 585 unsigned int flags) -
uspace/lib/c/generic/ns.c
r78bb04b r0dd16778 58 58 async_sess_t *sess = 59 59 async_connect_me_to(mgmt, exch, iface, service, arg3); 60 async_exchange_end(exch); 61 62 if (!sess) 63 return NULL; 64 65 /* 66 * FIXME Ugly hack to work around limitation of implementing 67 * parallel exchanges using multiple connections. Shift out 68 * first argument for non-initial connections. 69 */ 70 async_sess_args_set(sess, iface, arg3, 0); 71 72 return sess; 73 } 74 75 async_sess_t *service_connect_iface_extended(service_t service, iface_t iface, 76 sysarg_t arg3) 77 { 78 async_exch_t *exch = async_exchange_begin(session_ns); 79 if (!exch) 80 return NULL; 81 82 async_sess_t *sess = 83 async_connect_me_to_iface(exch, iface, service, arg3); 60 84 async_exchange_end(exch); 61 85 -
uspace/lib/c/include/async.h
r78bb04b r0dd16778 350 350 extern async_sess_t *async_connect_me_to(exch_mgmt_t, async_exch_t *, sysarg_t, 351 351 sysarg_t, sysarg_t); 352 extern async_sess_t *async_connect_me_to_iface(async_exch_t *, iface_t, 353 sysarg_t, sysarg_t); 352 354 extern async_sess_t *async_connect_me_to_blocking(exch_mgmt_t, async_exch_t *, 353 355 sysarg_t, sysarg_t, sysarg_t); -
uspace/lib/c/include/ipc/devman.h
r78bb04b r0dd16778 144 144 DEVMAN_CLIENT, 145 145 DEVMAN_CONNECT_TO_DEVICE, 146 DEVMAN_CONNECT_FROM_LOC,147 146 DEVMAN_CONNECT_TO_PARENTS_DEVICE 148 147 } devman_interface_t; -
uspace/lib/c/include/loc.h
r78bb04b r0dd16778 65 65 extern loc_object_type_t loc_id_probe(service_id_t); 66 66 67 extern async_sess_t *loc_service_connect_iface(service_id_t, iface_t, 68 unsigned int); 67 69 extern async_sess_t *loc_service_connect(exch_mgmt_t, service_id_t, 68 70 unsigned int); -
uspace/lib/c/include/ns.h
r78bb04b r0dd16778 43 43 extern int service_register(service_t); 44 44 extern async_sess_t *service_connect(exch_mgmt_t, service_t, sysarg_t); 45 extern async_sess_t *service_connect_iface_extended(service_t, iface_t, sysarg_t); 45 46 extern async_sess_t *service_connect_iface(exch_mgmt_t, sysarg_t, service_t, sysarg_t); 46 47 extern async_sess_t *service_connect_blocking(exch_mgmt_t, service_t, sysarg_t); -
uspace/srv/devman/loc.c
r78bb04b r0dd16778 60 60 61 61 loc_service_register_with_iface(loc_pathname, 62 &fun->service_id, DEVMAN_CONNECT_FROM_LOC);62 &fun->service_id, INTERFACE_DDF_CLIENT); 63 63 64 64 tree_add_loc_function(tree, fun); -
uspace/srv/devman/main.c
r78bb04b r0dd16778 221 221 devman_forward(iid, icall, false); 222 222 break; 223 case DEVMAN_CONNECT_FROM_LOC:223 case INTERFACE_DDF_CLIENT: 224 224 /* Someone connected through loc node. */ 225 225 devman_connection_loc(iid, icall);
Note:
See TracChangeset
for help on using the changeset viewer.