Changeset b61d47d in mainline for uspace/srv/devmap
- Timestamp:
- 2007-12-02T20:00:14Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 90c35436
- Parents:
- 8df2eab
- Location:
- uspace/srv/devmap
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/devmap/devmap.c
r8df2eab rb61d47d 449 449 * Find device driver owning requested device and forward 450 450 * the message to it. 451 *452 *453 451 */ 454 452 static void devmap_forward(ipc_callid_t callid, ipc_call_t *call) … … 460 458 * Get handle from request 461 459 */ 462 handle = IPC_GET_ARG 1(*call);460 handle = IPC_GET_ARG2(*call); 463 461 dev = devmap_device_find_handle(handle); 464 462 … … 470 468 } 471 469 472 /* FIXME: is this correct method how to pass argument on forwarding ?*/473 470 ipc_forward_fast(callid, dev->driver->phone, (ipcarg_t)(dev->handle), 474 0, IPC_FF_NONE);471 IPC_GET_ARG3(*call), 0, IPC_FF_NONE); 475 472 return; 476 473 } … … 670 667 continue; /* Exit thread */ 671 668 672 case DEVMAP_DEVICE_CONNECT_ME_TO:673 /* Connect client to selected device */674 printf("DEVMAP: connect to device %d.\n",675 IPC_GET_ARG1(call));676 devmap_forward(callid, &call);677 break;678 679 669 case DEVMAP_DEVICE_GET_HANDLE: 680 670 devmap_get_handle(callid, &call); … … 710 700 devmap_connection_client(iid, icall); 711 701 break; 702 case DEVMAP_CONNECT_TO_DEVICE: 703 /* Connect client to selected device */ 704 printf("DEVMAP: connect to device %d.\n", 705 IPC_GET_ARG2(*icall)); 706 devmap_forward(iid, icall); 707 break; 712 708 default: 713 709 ipc_answer_0(iid, ENOENT); /* No such interface */ -
uspace/srv/devmap/devmap.h
r8df2eab rb61d47d 42 42 DEVMAP_DRIVER_REGISTER = IPC_FIRST_USER_METHOD, 43 43 DEVMAP_DRIVER_UNREGISTER, 44 DEVMAP_DEVICE_CONNECT_ME_TO,45 44 DEVMAP_DEVICE_REGISTER, 46 45 DEVMAP_DEVICE_UNREGISTER, … … 83 82 } devmap_device_t; 84 83 85 /** Interface provided by DevMap. 86 * 84 /** Interface provided by devmap. 85 * Every process that connects to devmap must ask one of following 86 * interfaces otherwise connection will be refused. 87 87 */ 88 88 typedef enum { 89 DEVMAP_DRIVER = 1, 90 DEVMAP_CLIENT 89 /** Connect as device driver */ 90 DEVMAP_DRIVER = 1, 91 /** Connect as client */ 92 DEVMAP_CLIENT, 93 /** Create new connection to instance of device that 94 * is specified by second argument of call. */ 95 DEVMAP_CONNECT_TO_DEVICE 91 96 } devmap_interface_t; 92 97
Note:
See TracChangeset
for help on using the changeset viewer.