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

Namespaces

namespace  detail
 
namespace  filesystem
 
namespace  ipc
 
namespace  iros
 
namespace  linux
 
namespace  main
 
namespace  net
 
namespace  posix_error
 
namespace  runtime
 
namespace  system
 
namespace  test
 
namespace  this_thread
 
namespace  tty
 

Classes

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

Typedefs

using PosixError = iris::Error
 
using ProcessId = int
 
using PlatformThreadDeleter = di::DefaultDelete<PlatformThread>
 

Enumerations

enum class  Signal {
  WindowChange = 1 , 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  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 {
  WindowChange = 1 , 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  OpenMode {
  Readonly , WriteNew , WriteClobber , ReadWrite ,
  AppendOnly , ReadWriteClobber , AppendReadWrite
}
 

Functions

auto open_sync (di::PathView path, OpenMode open_mode, u16 create_mode=0666) -> di::Expected< SyncFile, di::GenericCode >
 
auto open_psuedo_terminal_controller (OpenMode open_mode, tty::WindowSize size) -> 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 &platform_thread) -> di::Result< void >
 

Variables

template<di::concepts::InstanceOf< di::Protocol > Proto>
constexpr auto ipc_server = ipc::IpcServer<Proto> {}
 
constexpr auto print = detail::PrintFunction<1> {}
 
constexpr auto eprint = detail::PrintFunction<2> {}
 
constexpr auto dprint = detail::PrintFunction<2> {}
 
constexpr auto println = detail::PrintlnFunction<1> {}
 
constexpr auto eprintln = detail::PrintlnFunction<2> {}
 
constexpr auto dprintln = detail::PrintlnFunction<2> {}
 
auto stdin = SyncFile { SyncFile::Owned::No, 0 }
 
auto stdout = SyncFile { SyncFile::Owned::No, 1 }
 
auto stderr = SyncFile { SyncFile::Owned::No, 2 }
 
constexpr auto clone_number = di::to_underlying(system::Number::clone3)
 

Typedef Documentation

◆ PlatformThreadDeleter

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

◆ ProcessId

typedef __kernel_pid_t dius::ProcessId = int

Enumeration Type Documentation

◆ OpenMode

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

◆ Signal [1/2]

enum class dius::Signal
strong
Enumerator
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
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,
tty::WindowSize size ) -> di::Expected<SyncFile, di::GenericCode>

◆ open_sync()

auto dius::open_sync ( di::PathView path,
OpenMode open_mode,
u16 create_mode = 0666 ) -> 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 & platform_thread) -> di::Result<void>

Variable Documentation

◆ clone_number

auto dius::clone_number = di::to_underlying(system::Number::clone3)
constexpr

◆ dprint

auto dius::dprint = detail::PrintFunction<2> {}
inlineconstexpr

◆ dprintln

auto dius::dprintln = detail::PrintlnFunction<2> {}
inlineconstexpr

◆ eprint

auto dius::eprint = detail::PrintFunction<2> {}
inlineconstexpr

◆ eprintln

auto dius::eprintln = detail::PrintlnFunction<2> {}
inlineconstexpr

◆ ipc_server

auto dius::ipc_server = ipc::IpcServer<Proto> {}
inlineconstexpr

◆ print

auto dius::print = detail::PrintFunction<1> {}
inlineconstexpr

◆ println

auto dius::println = detail::PrintlnFunction<1> {}
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