Changeset a0edf5f in mainline
- Timestamp:
- 2007-09-16T11:02:33Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b006bfb8
- Parents:
- 2b20947
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/ipc/ipc.h
r2b20947 ra0edf5f 103 103 * 104 104 * The protocol for negotiating is: 105 * - sys_connect_to_me - sends a message IPC_M_CONNECT TOME105 * - sys_connect_to_me - sends a message IPC_M_CONNECT_TO_ME 106 106 * - sys_wait_for_call - upon receipt tries to allocate new phone 107 107 * - if it fails, responds with ELIMIT … … 111 111 * the call is accepted and the response is sent back. 112 112 * - the allocated phoneid is passed to userspace 113 * (on the receiving sid ) as ARG3 of the call.113 * (on the receiving side) as ARG3 of the call. 114 114 * - the caller obtains taskid of the called thread 115 115 */ -
uspace/srv/vfs/vfs.c
r2b20947 ra0edf5f 86 86 return false; 87 87 if (info->ops[IPC_METHOD_TO_VFS_OP(VFS_UNMOUNT)] != VFS_OP_DEFINED) 88 return false; 89 if (info->ops[IPC_METHOD_TO_VFS_OP(VFS_LOOKUP)] != VFS_OP_DEFINED) 88 90 return false; 89 91 if (info->ops[IPC_METHOD_TO_VFS_OP(VFS_OPEN)] != VFS_OP_DEFINED) … … 193 195 } 194 196 } 195 196 /* 197 * TODO: 198 * 1. send the client the IPC_M_CONNECT_TO_ME call so that it makes a 199 * callback connection. 200 * 2. add the fs_info into fs_head 201 */ 197 198 /* 199 * Add fs_info to the list of registered FS's. 200 */ 201 list_append(&fs_info->fs_link, &fs_head); 202 203 /* 204 * ACK receiving a properly formatted, non-duplicit vfs_info. 205 */ 206 ipc_answer_fast(callid, EOK, 0, 0); 207 208 /* 209 * Now we want the client to send us the IPC_M_CONNECT_TO_ME call so 210 * that a callback connection is created and we have a phone through 211 * which to forward VFS requests to it. 212 */ 213 callid = async_get_call(&call); 214 if (IPC_GET_METHOD(call) != IPC_M_CONNECT_TO_ME) { 215 list_remove(&fs_info->fs_link); 216 futex_up(&fs_head_futex); 217 free(fs_info); 218 ipc_answer_fast(callid, EINVAL, 0, 0); 219 ipc_answer_fast(rid, EINVAL, 0, 0); 220 return; 221 } 222 fs_info->phone = IPC_GET_ARG3(call); 223 ipc_answer_fast(callid, EOK, 0, 0); 202 224 203 225 futex_up(&fs_head_futex); 226 227 /* 228 * That was it. The FS has been registered. 229 */ 230 ipc_answer_fast(rid, EOK, 0, 0); 204 231 } 205 232 -
uspace/srv/vfs/vfs.h
r2b20947 ra0edf5f 44 44 VFS_MOUNT, 45 45 VFS_UNMOUNT, 46 VFS_LOOKUP, 46 47 VFS_OPEN, 47 48 VFS_CREATE, … … 84 85 link_t fs_link; 85 86 vfs_info_t vfs_info; 87 ipcarg_t phone; 86 88 } fs_info_t; 87 89
Note:
See TracChangeset
for help on using the changeset viewer.