Changeset f658458 in mainline for uspace/lib/libc
- Timestamp:
- 2010-05-02T20:49:09Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bb864a0
- Parents:
- 25a7e11d
- Location:
- uspace/lib/libc
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/generic/device/char.c
r25a7e11d rf658458 38 38 #include <async.h> 39 39 #include <malloc.h> 40 #include <stdio.h> 40 41 41 42 … … 46 47 async_serialize_start(); 47 48 49 printf("calling interface %d\n", DEV_IFACE_ID(CHAR_DEV_IFACE)); 48 50 aid_t req = async_send_1(dev_phone, DEV_IFACE_ID(CHAR_DEV_IFACE), CHAR_READ_DEV, &answer); 49 51 -
uspace/lib/libc/generic/devman.c
r25a7e11d rf658458 230 230 } 231 231 232 int devman_device_get_handle(const char *pathname, device_handle_t *handle, unsigned int flags) 233 { 234 int phone = devman_get_phone(DEVMAN_CLIENT, flags); 235 236 if (phone < 0) 237 return phone; 238 239 async_serialize_start(); 240 241 ipc_call_t answer; 242 aid_t req = async_send_2(phone, DEVMAN_DEVICE_GET_HANDLE, flags, 0, 243 &answer); 244 245 ipcarg_t retval = async_data_write_start(phone, pathname, str_size(pathname)); 246 if (retval != EOK) { 247 async_wait_for(req, NULL); 248 async_serialize_end(); 249 return retval; 250 } 251 252 async_wait_for(req, &retval); 253 254 async_serialize_end(); 255 256 if (retval != EOK) { 257 if (handle != NULL) 258 *handle = (device_handle_t) -1; 259 return retval; 260 } 261 262 if (handle != NULL) 263 *handle = (device_handle_t) IPC_GET_ARG1(answer); 264 265 return retval; 266 } 267 268 232 269 /** @} 233 270 */ -
uspace/lib/libc/include/devman.h
r25a7e11d rf658458 51 51 int devman_parent_device_connect(device_handle_t handle, unsigned int flags); 52 52 53 int devman_device_get_handle(const char *pathname, device_handle_t *handle, unsigned int flags); 54 53 55 54 56 #endif -
uspace/lib/libc/include/ipc/devman.h
r25a7e11d rf658458 138 138 } devman_to_driver_t; 139 139 140 typedef enum { 141 DEVMAN_DEVICE_GET_HANDLE = IPC_FIRST_USER_METHOD 142 } client_to_devman_t; 143 140 144 #endif 141 145
Note:
See TracChangeset
for help on using the changeset viewer.