Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 2b88074b in mainline for uspace/srv/vfs/vfs.h


Ignore:
Timestamp:
2009-10-29T22:06:46Z (12 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master
Children:
2e983c7
Parents:
14ecd6c
Message:

vfs: file descriptors housekeeping changes

  • add support for allocating new file descriptors from the end of the fd range (O_DESC)
  • add support for assigning of an already opened file to a free file descriptor

vfs: VFS_OUT_CLOSE is called only when the file reference count is about to drop to zero
vfs: implement VFS_IN_DUP

libc: optimize current working directory housekeeping

  • using opendir() was an overkill
  • allocate current working directory file descriptor from the end of the fd range using O_DESC (so it doesn't mess with the well-known descriptors 0, 1 and 2)

libc: implement dup2() (via VFS_IN_DUP)

getvc: change stdin/stdout/stderr by a slightly more elegant way (using dup2())

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/vfs/vfs.h

    r14ecd6c r2b88074b  
    186186extern bool vfs_files_init(void);
    187187extern vfs_file_t *vfs_file_get(int);
    188 extern int vfs_fd_alloc(void);
     188extern int vfs_fd_assign(vfs_file_t *file, int fd);
     189extern int vfs_fd_alloc(bool desc);
    189190extern int vfs_fd_free(int);
    190191
     
    200201extern void vfs_open_node(ipc_callid_t, ipc_call_t *);
    201202extern void vfs_sync(ipc_callid_t, ipc_call_t *);
     203extern void vfs_dup(ipc_callid_t, ipc_call_t *);
    202204extern void vfs_close(ipc_callid_t, ipc_call_t *);
    203205extern void vfs_read(ipc_callid_t, ipc_call_t *);
Note: See TracChangeset for help on using the changeset viewer.