IO-Accessmode

Defines how you can access a data block.  This aspect is shared between all objects / modules which support accessing of persistent or transient data.

Summary
IO-AccessmodeDefines how you can access a data block.
CopyrightThis program is free software.
Files
C-kern/api/io/accessmode.hHeader file IO-Accessmode.
Enumerations
accessmode_eDetermines how you can access a data block (on disk or in memory).

Copyright

This program is free software.  You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

Author

© 2011 Jörg Seebohn

Files

C-kern/api/io/accessmode.h

Header file IO-Accessmode.

Enumerations

accessmode_e

Determines how you can access a data block (on disk or in memory).  You can view it either as a right what you can do with it or as some kind of protection what you can not do with it if you have not set the corresponding mode bit.

accessmode_NONENeither read nor write nor exec is allowed.
accessmode_READAllows for reading (only).
accessmode_WRITEAllows for writing (only).
accessmode_RDWRCombination of accessmode_READ and accessmode_WRITE.
accessmode_EXECAllows for executing (only).  This is normally supported only in combination with accessmode_READ.
accessmode_PRIVATEWrite access to data or memory block is private to its process (COPY_ON_WRITE).  This must be ored together with another value.  It is not useful of its own.  This value is default for allocated memory or mapped (virtual) memory even if you do not request it explicitly.
accessmode_SHAREDA write to a data or memory block is shared between all processes.  This mode needs some external synchronisation mechanism to prevent race conditions.  This must be ored together with another value.  It is not useful of its own.  This value is default for accessing persistent data blocks on files or other devices even if you do not request it explicitly.  Most devices do not support accessmode_PRIVATE.
accessmode_RDWR_PRIVATECombination of accessmode_RDWR and accessmode_PRIVATE.
accessmode_RDWR_SHAREDCombination of accessmode_RDWR and accessmode_SHARED.
accessmode_NEXTFREE_BITPOSNext free bit position useful in a subtype of accessmode_e.
Defines how you can access a data block.
Allows for reading (only).
Allows for writing (only).
Write access to data or memory block is private to its process (COPY_ON_WRITE).
Combination of accessmode_READ and accessmode_WRITE.
A write to a data or memory block is shared between all processes.
Determines how you can access a data block (on disk or in memory).
Close