Defines how you can access a data block. This aspect is shared between all objects / modules which support accessing of persistent or transient data.
IO-Accessmode | Defines how you can access a data block. |
Copyright | This program is free software. |
Files | |
C-kern/ | Header file IO-Accessmode. |
Enumerations | |
accessmode_e | Determines how you can access a data block (on disk or in memory). |
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.
© 2011 Jörg Seebohn
Header file IO-Accessmode.
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_NONE | Neither read nor write nor exec is allowed. |
accessmode_READ | Allows for reading (only). |
accessmode_WRITE | Allows for writing (only). |
accessmode_RDWR | Combination of accessmode_READ and accessmode_WRITE. |
accessmode_EXEC | Allows for executing (only). This is normally supported only in combination with accessmode_READ. |
accessmode_PRIVATE | Write 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_SHARED | A 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_PRIVATE | Combination of accessmode_RDWR and accessmode_PRIVATE. |
accessmode_RDWR_SHARED | Combination of accessmode_RDWR and accessmode_SHARED. |
accessmode_NEXTFREE_BITPOS | Next free bit position useful in a subtype of accessmode_e. |