Expand description
Abstraction of POSIX constructs with a safe API
Modules§
- access_
mode - The
AccessModedescribes the mode in which resources likecrate::file::File,crate::shared_memory::SharedMemoryor others should be opened. - adaptive_
wait AdaptiveWaitis a building block which can be integrated into busy loops to make them less CPU consuming.- barrier
- Inter-process capable
Barrierwhich blocks a previously defined number of waiters untilthe all the waiters reachedBarrier::wait() - clock
- Contains POSIX timing related abstractions.
- config
- Defines configuration options for the posix module. They can be adapted when working on a different system.
- creation_
mode - The
CreationModedescribes how certain posix resources should be created. - deadline_
queue - Example
- directory
- Create and read directory contents based on a POSIX api. It provides also advanced features
like
Permissionsetting and to be created from aFileDescriptor - file
- Read, create, write or modify files based on a POSIX api. It provides also advanced features
like
Permissionsetting and to be created from aFileDescriptor. - file_
descriptor - Provides a
FileDescriptorabstraction which takes the ownership of low-level POSIX file descriptors and theFileDescriptorBased&FileDescriptorManagementtraits which provide advanced functionalities to allFileDescriptorBasedconstructs. - file_
descriptor_ set - Abstracts a POSIX file descriptor set based of FD_* and select.
Can be used to wait on multiple objects which implement the
SynchronousMultiplexingtrait. - file_
lock - A FileLock can be created around any object which implements the
FileDescriptorBasedtrait. Either one can exclusively lock the file for writing or many can lock it for reading. - file_
type FileTypedescribes the type of files which can be used in a POSIX system.- group
- Provides the trait
GroupExtto create groups from strings by interpreting them as group name or from unsigned integers by interpreting them as group id. TheGroupstruct provides access to the properties of a POSIX group. - handle_
errno - Used internally to perform error handling based on errnos
- ipc_
capable - memory
- Provides an interface for low-level heap allocations.
- memory_
lock - A
MemoryLockexcludes a specific range in the memory from paging, e.g. makes it non-swapable. This may increase the runtime and reduce jitter in a realtime applications since the specific region inside the memory is not moved into the swap space. - memory_
mapping - Safe abstraction of the POSIX calls
mmap,munmapandmprotect. - metadata
Metadatacontains all informations like type, credentials, size, access times about every structure which has a file handle representation. Every struct which implements thecrate::file_descriptor::FileDescriptorManagementtrait can emit aMetadata. One struct is for instancecrate::file::File.- mutex
- Provides an inter-process capable POSIX
Mutexwhich can be created by theMutexBuilder. - ownership
- Represents the
Ownershipin a unix environment consisting of user and group. Can be used in combination withcrate::file_descriptor::FileDescriptorManagementto set the credentials ofcrate::file::File,crate::shared_memory::SharedMemoryand others. - permission
- Defines the
Permissionof a file or directory in a POSIX system. Can be used in combination withcrate::file_descriptor::FileDescriptorManagementto set the credentials ofcrate::file::File,crate::shared_memory::SharedMemoryand others. - process
- Provides an abstraction of
Processes in a POSIX system. - process_
state - Process monitoring via holding a file lock of a specific file. If the process crashes the lock will be released by the operating system and another process can detect the crash. If the process shutdowns correctly the file is removed and another process detects the clean shutdown.
- read_
write_ mutex - A POSIX inter-process capable
ReadWriteMutexwhere either multiple readers can acquire multiple read-locks or one writer can acquire a write-lock. It is built by theReadWriteMutexBuilder. - scheduler
- Provides a POSIX
Schedulerabstraction. - semaphore
- Provides the
NamedSemaphoreand theUnnamedSemaphore. Both can be used in an inter-process context to signal events between processes. - shared_
memory - Provides access to a POSIX
SharedMemoryObject used to share memory between processes. - signal
- Provides a POSIX
SignalHandler. It provides an interface to register custom callbacks for signals, to perform a blocking wait until a certain signal arrived (for instance like CTRL+c) and tracks signals which were received by the process. - signal_
set - socket_
ancillary - The
SocketAncillarycan be sent withcrate::unix_datagram_socket::UnixDatagramSender::try_send_msg()and received viacrate::unix_datagram_socket::UnixDatagramReceiver::try_receive_msg(). One can use it to exchange file descriptors between processes or authenticate at another process by sendingSocketCredcontaining the process pid, uid and gid. - socket_
pair - Abstraction of a unix streaming socket pair. Every
StreamingSocketcan send and receive data on distinct channels, meaning that aStreamingSocketwill never acquire the data it has sent via a receive call. - system_
configuration - Provides information about the POSIX
SystemInfo,Limits, availableSysOptionandFeatures. - thread
- An abstraction of a POSIX
Threadwith a rich feature set. - udp_
socket - Abstraction of an UDP socket.
- unique_
system_ id - Generates a
UniqueSystemIdwhich is in all processes on the current system. The guarantee is that no other process with the same id exists. But it is possible that a process with a specific id terminates and a new process generates the same id. - unix_
datagram_ socket - Abstraction of datagram based unix domain sockets. The
UnixDatagramReceivercreates a socket and theUnixDatagramSendercan connect to it and send messages. - user
- Provides the trait
UserExtto create users from strings by interpreting them as user name or from unsigned integers by interpreting them as user id. TheUserstruct provides access to the properties of a POSIX user.