Changeset ea186c6 in mainline for uspace/lib/c
- Timestamp:
- 2011-08-18T20:27:26Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 921b84f
- Parents:
- 1f44b056 (diff), ef7052ec (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. - Location:
- uspace/lib/c
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/devman.c
r1f44b056 rea186c6 308 308 } 309 309 310 /** Remove function from device. 311 * 312 * Request devman to remove function owned by this driver task. 313 * @param funh Devman handle of the function 314 * 315 * @return EOK on success or negative error code. 316 */ 317 int devman_remove_function(devman_handle_t funh) 318 { 319 async_exch_t *exch; 320 sysarg_t retval; 321 322 exch = devman_exchange_begin_blocking(DEVMAN_DRIVER); 323 retval = async_req_1_0(exch, DEVMAN_REMOVE_FUNCTION, (sysarg_t) funh); 324 devman_exchange_end(exch); 325 326 return (int) retval; 327 } 328 310 329 async_sess_t *devman_parent_device_connect(exch_mgmt_t mgmt, 311 330 devman_handle_t handle, unsigned int flags) -
uspace/lib/c/generic/loc.c
r1f44b056 rea186c6 267 267 } 268 268 269 /** Register new device.270 * 271 * The @p interface is used when forwarding connection to the driver.269 /** Register new service. 270 * 271 * The @p interface is used when forwarding connection to the server. 272 272 * If not 0, the first argument is the interface and the second argument 273 273 * is the service ID. … … 276 276 * the handle (to ensure backward compatibility). 277 277 * 278 * @param fq dn Fully qualified device name.279 * @param[out] handle Handle to the created instance of device.280 * @param interface Interface when forwarding .281 * 282 */ 283 int loc_service_register_with_iface(const char *fq dn,284 service_id_t * handle, sysarg_t interface)278 * @param fqsn Fully qualified service name 279 * @param[out] sid Service ID of new service 280 * @param interface Interface when forwarding 281 * 282 */ 283 int loc_service_register_with_iface(const char *fqsn, 284 service_id_t *sid, sysarg_t interface) 285 285 { 286 286 async_exch_t *exch = loc_exchange_begin_blocking(LOC_PORT_SUPPLIER); … … 289 289 aid_t req = async_send_2(exch, LOC_SERVICE_REGISTER, interface, 0, 290 290 &answer); 291 sysarg_t retval = async_data_write_start(exch, fq dn, str_size(fqdn));291 sysarg_t retval = async_data_write_start(exch, fqsn, str_size(fqsn)); 292 292 293 293 loc_exchange_end(exch); … … 301 301 302 302 if (retval != EOK) { 303 if ( handle!= NULL)304 * handle= -1;305 306 return retval; 307 } 308 309 if ( handle!= NULL)310 * handle= (service_id_t) IPC_GET_ARG1(answer);303 if (sid != NULL) 304 *sid = -1; 305 306 return retval; 307 } 308 309 if (sid != NULL) 310 *sid = (service_id_t) IPC_GET_ARG1(answer); 311 311 312 312 return retval; 313 313 } 314 314 315 /** Register new device. 316 * 317 * @param fqdn Fully qualified device name. 318 * @param handle Output: Handle to the created instance of device. 319 * 320 */ 321 int loc_service_register(const char *fqdn, service_id_t *handle) 322 { 323 return loc_service_register_with_iface(fqdn, handle, 0); 315 /** Register new service. 316 * 317 * @param fqsn Fully qualified service name 318 * @param sid Output: ID of new service 319 * 320 */ 321 int loc_service_register(const char *fqdn, service_id_t *sid) 322 { 323 return loc_service_register_with_iface(fqdn, sid, 0); 324 } 325 326 /** Unregister service. 327 * 328 * @param sid Service ID 329 */ 330 int loc_service_unregister(service_id_t sid) 331 { 332 async_exch_t *exch; 333 sysarg_t retval; 334 335 exch = loc_exchange_begin_blocking(LOC_PORT_SUPPLIER); 336 retval = async_req_1_0(exch, LOC_SERVICE_UNREGISTER, sid); 337 loc_exchange_end(exch); 338 339 return (int)retval; 324 340 } 325 341 -
uspace/lib/c/include/devman.h
r1f44b056 rea186c6 49 49 extern int devman_add_function(const char *, fun_type_t, match_id_list_t *, 50 50 devman_handle_t, devman_handle_t *); 51 extern int devman_remove_function(devman_handle_t); 51 52 52 53 extern async_sess_t *devman_device_connect(exch_mgmt_t, devman_handle_t, -
uspace/lib/c/include/ipc/devman.h
r1f44b056 rea186c6 138 138 DEVMAN_ADD_FUNCTION, 139 139 DEVMAN_ADD_MATCH_ID, 140 DEVMAN_ADD_DEVICE_TO_CATEGORY 141 140 DEVMAN_ADD_DEVICE_TO_CATEGORY, 141 DEVMAN_REMOVE_FUNCTION 142 142 } driver_to_devman_t; 143 143 -
uspace/lib/c/include/loc.h
r1f44b056 rea186c6 50 50 extern int loc_service_register_with_iface(const char *, service_id_t *, 51 51 sysarg_t); 52 extern int loc_service_unregister(service_id_t); 52 53 extern int loc_service_add_to_cat(service_id_t, category_id_t); 53 54
Note:
See TracChangeset
for help on using the changeset viewer.