dius 0.1.0
Loading...
Searching...
No Matches
dius Namespace Reference

Namespaces

namespace  detail
 
namespace  filesystem
 
namespace  ipc
 
namespace  linux
 
namespace  main
 
namespace  net
 
namespace  posix
 
namespace  posix_error
 
namespace  runtime
 
namespace  syscalls
 
namespace  system
 
namespace  this_thread
 
namespace  tty
 

Classes

class  ConditionVariable
 
class  IoContext
 
class  MemoryRegion
 
class  Mutex
 
struct  PlatformThread
 
struct  PlatformThreadDeleter
 
class  SteadyClock
 
class  SyncFile
 
class  Thread
 Class representing a single thread of execution. More...
 

Typedefs

using IoContext = linux::IoUringContext
 
using ProcessId = pid_t
 
using PlatformThreadDeleter = di::DefaultDelete<PlatformThread>
 
using ConditionVariable = di::sync::DumbConditionVariable
 
using Mutex = di::sync::DumbSpinlock
 

Enumerations

enum class  OpenMode {
  Readonly , WriteNew , WriteClobber , ReadWrite ,
  AppendOnly , ReadWriteClobber , AppendReadWrite
}
 
enum class  OpenFlags { None = 0 , NoControllingTerminal = 1 , KeepAfterExec = 2 }
 
enum class  PosixError : long {
  Success = 0 , AddressFamilyNotSupported = EAFNOSUPPORT , AddressInUse = EADDRINUSE , AddressNotAvailable = EADDRNOTAVAIL ,
  AlreadyConnected = EISCONN , ArgumentListTooLong = E2BIG , ArgumentOutOfDomain = EDOM , BadAddress = EFAULT ,
  BadFileDescriptor = EBADF , BadMessage = EBADMSG , BrokenPipe = EPIPE , ConnectionAborted = ECONNABORTED ,
  ConnectionAlreadyInProgress = EALREADY , ConnectionRefused = ECONNREFUSED , ConnectionReset = ECONNRESET , CrossDeviceLink = EXDEV ,
  DestinationAddressRequired = EDESTADDRREQ , DeviceOrResourceBusy = EBUSY , DirectoryNotEmpty = ENOTEMPTY , ExecutableFormatError = ENOEXEC ,
  FileExists = EEXIST , FileTooLarge = EFBIG , FilenameTooLong = ENAMETOOLONG , FunctionNotSupported = ENOSYS ,
  HostUnreachable = EHOSTUNREACH , IdentifierRemoved = EIDRM , IllegalByteSequence = EILSEQ , InappropriateIoControlOperation = ENOTTY ,
  Interrupted = EINTR , InvalidArgument = EINVAL , InvalidSeek = ESPIPE , IoError = EIO ,
  IsADirectory = EISDIR , MessageSize = EMSGSIZE , NetworkDown = ENETDOWN , NetworkReset = ENETRESET ,
  NetworkUnreachable = ENETUNREACH , NoBufferSpace = ENOBUFS , NoChildProcess = ECHILD , NoLink = ENOLINK ,
  NoLockAvailable = ENOLCK , NoMessageAvailable = ENODATA , NoMessage = ENOMSG , NoProtocolOption = ENOPROTOOPT ,
  NoSpaceOnDevice = ENOSPC , NoStreamResources = ENOSR , NoSuchDeviceOrAddress = ENXIO , NoSuchDevice = ENODEV ,
  NoSuchFileOrDirectory = ENOENT , NoSuchProcess = ESRCH , NotADirectory = ENOTDIR , NotASocket = ENOTSOCK ,
  NotAStream = ENOSTR , NotConnected = ENOTCONN , NotEnoughMemory = ENOMEM , NotSupported = EOPNOTSUPP ,
  OperationCanceled = ECANCELED , OperationInProgress = EINPROGRESS , OperationNotPermitted = EPERM , OperationNotSupported = EOPNOTSUPP ,
  OperationWouldBlock = EWOULDBLOCK , OwnerDead = EOWNERDEAD , PermissionDenied = EACCES , ProtocolError = EPROTO ,
  ProtocolNotSupported = EPROTONOSUPPORT , ReadOnlyFileSystem = EROFS , ResourceDeadlockWouldOccur = EDEADLK , ResourceUnavailableTryAgain = EAGAIN ,
  ResultOutOfRange = ERANGE , StateNotRecoverable = ENOTRECOVERABLE , StreamTimeout = ETIME , TextFileBusy = ETXTBSY ,
  TimedOut = ETIMEDOUT , TooManyFilesOpenInSystem = ENFILE , TooManyFilesOpen = EMFILE , TooManyLinks = EMLINK ,
  TooManySymbolicLinkLevels = ELOOP , ValueTooLarge = EOVERFLOW , WrongProtocolType = EPROTOTYPE
}
 
enum class  Signal {
  Hangup = SIGHUP , Interrupt = SIGINT , Quit = SIGQUIT , IllegalInstruction = SIGILL ,
  Trap = SIGTRAP , Abort = SIGABRT , Bus = SIGBUS , FloatingPointException = SIGFPE ,
  Kill = SIGKILL , User1 = SIGUSR1 , SegmentationViolation = SIGSEGV , User2 = SIGUSR2 ,
  Pipe = SIGPIPE , Alarm = SIGALRM , Terminal = SIGTERM , Child = SIGCHLD ,
  Continue = SIGCONT , Stop = SIGSTOP , TerminalStop = SIGTSTP , TerminalInput = SIGTTIN ,
  TerminalOutput = SIGTTOU , Urgent = SIGURG , VTAlarm = SIGVTALRM , WindowChange = SIGWINCH ,
  Hangup = 1 , Interrupt , Quit , IllegalInstruction ,
  Trap , Abort , IOTimeout = Abort , Bus ,
  FloatingPointException , Kill , User1 , SegmentationViolation ,
  User2 , Pipe , Alarm , Terminal ,
  StackFault , Child , Continue , Stop ,
  TerminalStop , TerminalInput , TerminalOutput , Urgent ,
  XCPU , GraphicsSize , VTAlarm , Profile ,
  WindowChange , IO , Poll = IO , Power ,
  System
}
 
enum class  Signal {
  Hangup = SIGHUP , Interrupt = SIGINT , Quit = SIGQUIT , IllegalInstruction = SIGILL ,
  Trap = SIGTRAP , Abort = SIGABRT , Bus = SIGBUS , FloatingPointException = SIGFPE ,
  Kill = SIGKILL , User1 = SIGUSR1 , SegmentationViolation = SIGSEGV , User2 = SIGUSR2 ,
  Pipe = SIGPIPE , Alarm = SIGALRM , Terminal = SIGTERM , Child = SIGCHLD ,
  Continue = SIGCONT , Stop = SIGSTOP , TerminalStop = SIGTSTP , TerminalInput = SIGTTIN ,
  TerminalOutput = SIGTTOU , Urgent = SIGURG , VTAlarm = SIGVTALRM , WindowChange = SIGWINCH ,
  Hangup = 1 , Interrupt , Quit , IllegalInstruction ,
  Trap , Abort , IOTimeout = Abort , Bus ,
  FloatingPointException , Kill , User1 , SegmentationViolation ,
  User2 , Pipe , Alarm , Terminal ,
  StackFault , Child , Continue , Stop ,
  TerminalStop , TerminalInput , TerminalOutput , Urgent ,
  XCPU , GraphicsSize , VTAlarm , Profile ,
  WindowChange , IO , Poll = IO , Power ,
  System
}
 

Functions

auto open_sync (di::PathView path, OpenMode open_mode, u16 create_mode=0666, OpenFlags flags=OpenFlags::None) -> di::Expected< SyncFile, di::GenericCode >
 
auto open_psuedo_terminal_controller (OpenMode open_mode) -> di::Expected< SyncFile, di::GenericCode >
 
auto open_tempory_file () -> di::Expected< SyncFile, di::GenericCode >
 
auto read_to_string (di::PathView path) -> di::Result< di::String >
 
auto spawn_thread (PlatformThread &) -> di::Result< void >
 

Variables

template<di::concepts::InstanceOf< di::Protocol > Proto>
constexpr auto ipc_server = ipc::IpcServer<Proto> {}
 
constexpr auto print = detail::PrintFunction {}
 
constexpr auto eprint = detail::PrintFunction {}
 
constexpr auto println = detail::EPrintlnFunction {}
 
constexpr auto eprintln = detail::EPrintlnFunction {}
 
auto stdin = SyncFile { SyncFile::Owned::No, 0 }
 
auto stdout = SyncFile { SyncFile::Owned::No, 1 }
 
auto stderr = SyncFile { SyncFile::Owned::No, 2 }
 

Typedef Documentation

◆ ConditionVariable

using dius::ConditionVariable = di::sync::DumbConditionVariable

◆ IoContext

using dius::IoContext = linux::IoUringContext

◆ Mutex

using dius::Mutex = di::sync::DumbSpinlock

◆ PlatformThreadDeleter

using dius::PlatformThreadDeleter = di::DefaultDelete<PlatformThread>

◆ ProcessId

typedef __kernel_pid_t dius::ProcessId = pid_t

Enumeration Type Documentation

◆ OpenFlags

enum class dius::OpenFlags
strong
Enumerator
None 
NoControllingTerminal 
KeepAfterExec 

◆ OpenMode

enum class dius::OpenMode
strong
Enumerator
Readonly 
WriteNew 
WriteClobber 
ReadWrite 
AppendOnly 
ReadWriteClobber 
AppendReadWrite 

◆ Signal [1/2]

enum class dius::Signal
strong
Enumerator
Hangup 
Interrupt 
Quit 
IllegalInstruction 
Trap 
Abort 
Bus 
FloatingPointException 
Kill 
User1 
SegmentationViolation 
User2 
Pipe 
Alarm 
Terminal 
Child 
Continue 
Stop 
TerminalStop 
TerminalInput 
TerminalOutput 
Urgent 
VTAlarm 
WindowChange 
Hangup 
Interrupt 
Quit 
IllegalInstruction 
Trap 
Abort 
IOTimeout 
Bus 
FloatingPointException 
Kill 
User1 
SegmentationViolation 
User2 
Pipe 
Alarm 
Terminal 
StackFault 
Child 
Continue 
Stop 
TerminalStop 
TerminalInput 
TerminalOutput 
Urgent 
XCPU 
GraphicsSize 
VTAlarm 
Profile 
WindowChange 
IO 
Poll 
Power 
System 

◆ Signal [2/2]

enum class dius::Signal
strong
Enumerator
Hangup 
Interrupt 
Quit 
IllegalInstruction 
Trap 
Abort 
Bus 
FloatingPointException 
Kill 
User1 
SegmentationViolation 
User2 
Pipe 
Alarm 
Terminal 
Child 
Continue 
Stop 
TerminalStop 
TerminalInput 
TerminalOutput 
Urgent 
VTAlarm 
WindowChange 
Hangup 
Interrupt 
Quit 
IllegalInstruction 
Trap 
Abort 
IOTimeout 
Bus 
FloatingPointException 
Kill 
User1 
SegmentationViolation 
User2 
Pipe 
Alarm 
Terminal 
StackFault 
Child 
Continue 
Stop 
TerminalStop 
TerminalInput 
TerminalOutput 
Urgent 
XCPU 
GraphicsSize 
VTAlarm 
Profile 
WindowChange 
IO 
Poll 
Power 
System 

Function Documentation

◆ open_psuedo_terminal_controller()

auto dius::open_psuedo_terminal_controller ( OpenMode open_mode) -> di::Expected< SyncFile, di::GenericCode >

◆ open_sync()

auto dius::open_sync ( di::PathView path,
OpenMode open_mode,
u16 create_mode = 0666,
OpenFlags flags = OpenFlags::None ) -> di::Expected< SyncFile, di::GenericCode >

◆ open_tempory_file()

auto dius::open_tempory_file ( ) -> di::Expected< SyncFile, di::GenericCode >

◆ read_to_string()

auto dius::read_to_string ( di::PathView path) -> di::Result< di::String >

◆ spawn_thread()

auto dius::spawn_thread ( PlatformThread & ) -> di::Result< void >

Variable Documentation

◆ eprint

auto dius::eprint = detail::PrintFunction {}
inlineconstexpr

◆ eprintln

auto dius::eprintln = detail::EPrintlnFunction {}
inlineconstexpr

◆ ipc_server

template<di::concepts::InstanceOf< di::Protocol > Proto>
auto dius::ipc_server = ipc::IpcServer<Proto> {}
inlineconstexpr

◆ print

auto dius::print = detail::PrintFunction {}
inlineconstexpr

◆ println

auto dius::println = detail::EPrintlnFunction {}
inlineconstexpr

◆ stderr

auto dius::stderr = SyncFile { SyncFile::Owned::No, 2 }
inline

◆ stdin

auto dius::stdin = SyncFile { SyncFile::Owned::No, 0 }
inline

◆ stdout

auto dius::stdout = SyncFile { SyncFile::Owned::No, 1 }
inline