vnop_map Entry Point
Purpose
Validates file mapping requests.
Syntax
Parameters
Note: The addr, offset,
and length parameters are unused in the current implementation.
The file system is expected to store the segment ID with the file
in the gn_seg field of the g-node for the file.
Item | Description |
---|---|
vp | Points to the virtual node (v-node) of the file. |
addr | Identifies the location within the process address space where the mapping is to begin. |
length | Specifies the maximum size to be mapped. |
offset | Specifies the location within the file where the mapping is to begin. |
flags | Identifies what type of mapping to perform. This value is
composed of bit values defined in the /usr/include/sys/shm.h file.
The following values are of particular interest to file system implementations:
|
crp | Points to the cred structure. This structure contains data that applications can use to validate access permission. |
Description
The vnop_map entry point is called by the logical file system to validate mapping requests resulting from the mmap or shmat subroutines. The logical file system creates the virtual memory object (if it does not already exist) and increments the object's use count.
Execution Environment
The vnop_map entry point can be called from the process environment only.
Return Values
Item | Description |
---|---|
0 | Indicates success. |
Nonzero return values are returned from the /usr/include/sys/errno.h file to indicate failure.