My Kernel v0.1.0
Collaboration diagram for Virtual nodes:

Data Structures

struct  vnode_operations
 Vector table for operations performed on a single virtual node. More...
 
struct  vnode
 represents a single virtual node More...
 

Enumerations

enum  vnode_type {
  VNODE_FIFO = S_IFIFO , VNODE_CHARDEVICE = S_IFCHR , VNODE_DIRECTORY = S_IFDIR , VNODE_BLOCKDEVICE = S_IFBLK ,
  VNODE_FILE = S_IFREG , VNODE_SYMLINK = S_IFLNK , VNODE_SOCKET = S_IFSOCK
}
 The different existing types of vnodes. More...
 

Functions

vnode_tvfs_vnode_acquire (vnode_t *, bool *)
 Increment the refcount of a vnode. More...
 
vnode_tvfs_vnode_release (vnode_t *)
 Decrease the refcount of a vnode. More...
 

Detailed Description

Enumeration Type Documentation

◆ vnode_type

enum typedef enum vnode_type vnode_type
Enumerator
VNODE_FIFO 

FIFO.

VNODE_CHARDEVICE 

Character device.

VNODE_DIRECTORY 

Regular directory.

VNODE_BLOCKDEVICE 

Block device.

VNODE_FILE 

Regular file.

VNODE_SYMLINK 

Symbolic link.

VNODE_SOCKET 

Socket file.

Function Documentation

◆ vfs_vnode_acquire()

vnode_t * vfs_vnode_acquire ( vnode_t node,
bool *  new 
)

Similarily to any other synchronization mechanism, you must call vfs_vnode_release once you are done using this node

Parameters
vnodeThe referenced vnode
[out]newSet to true if a new vnode was created (optional)
Returns
The original vnode, or a newly allocated one if NULL

◆ vfs_vnode_release()

vnode_t * vfs_vnode_release ( vnode_t node)
Warning
The vnode is free'd if the new refcount is 0
Returns
The original vnode, NULL if the new refcount is 0