Rev 2768 | Rev 3845 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2768 | Rev 2770 | ||
---|---|---|---|
Line 292... | Line 292... | ||
292 | /* |
292 | /* |
293 | * That was it. The FS has been registered. |
293 | * That was it. The FS has been registered. |
294 | * In reply to the VFS_REGISTER request, we assign the client file |
294 | * In reply to the VFS_REGISTER request, we assign the client file |
295 | * system a global file system handle. |
295 | * system a global file system handle. |
296 | */ |
296 | */ |
297 | fs_info->fs_handle = (int) atomic_postinc(&fs_handle_next); |
297 | fs_info->fs_handle = (fs_handle_t) atomic_postinc(&fs_handle_next); |
298 | ipc_answer_1(rid, EOK, (ipcarg_t) fs_info->fs_handle); |
298 | ipc_answer_1(rid, EOK, (ipcarg_t) fs_info->fs_handle); |
299 | 299 | ||
300 | fibril_dec_sercount(); |
300 | fibril_dec_sercount(); |
301 | futex_up(&fs_head_futex); |
301 | futex_up(&fs_head_futex); |
302 | 302 | ||
Line 309... | Line 309... | ||
309 | * @param handle File system handle. |
309 | * @param handle File system handle. |
310 | * |
310 | * |
311 | * @return Phone over which a multi-call request can be safely |
311 | * @return Phone over which a multi-call request can be safely |
312 | * sent. Return 0 if no phone was found. |
312 | * sent. Return 0 if no phone was found. |
313 | */ |
313 | */ |
314 | int vfs_grab_phone(int handle) |
314 | int vfs_grab_phone(fs_handle_t handle) |
315 | { |
315 | { |
316 | /* |
316 | /* |
317 | * For now, we don't try to be very clever and very fast. |
317 | * For now, we don't try to be very clever and very fast. |
318 | * We simply lookup the phone in the fs_head list. We currently don't |
318 | * We simply lookup the phone in the fs_head list. We currently don't |
319 | * open any additional phones (even though that itself would be pretty |
319 | * open any additional phones (even though that itself would be pretty |
Line 384... | Line 384... | ||
384 | * @param lock If true, the function will down and up the |
384 | * @param lock If true, the function will down and up the |
385 | * fs_head_futex. |
385 | * fs_head_futex. |
386 | * |
386 | * |
387 | * @return File system handle or zero if file system not found. |
387 | * @return File system handle or zero if file system not found. |
388 | */ |
388 | */ |
389 | int fs_name_to_handle(char *name, bool lock) |
389 | fs_handle_t fs_name_to_handle(char *name, bool lock) |
390 | { |
390 | { |
391 | int handle = 0; |
391 | int handle = 0; |
392 | 392 | ||
393 | if (lock) |
393 | if (lock) |
394 | futex_down(&fs_head_futex); |
394 | futex_down(&fs_head_futex); |