sys.h
// Copyright (c) 1999-2018 David Muse
// See the COPYING file for more information.
#ifndef RUDIMENTS_SYS_H
#define RUDIMENTS_SYS_H
#include <rudiments/private/sysincludes.h>
class RUDIMENTS_DLLSPEC sys {
public:
static char *getOperatingSystemName();
static char *getOperatingSystemRelease();
static char *getOperatingSystemVersion();
static char *getOperatingSystemArchitecture();
static const char *getRudimentsVersion();
static char *getHostName();
static bool setHostName(const char *hostname);
static bool setHostName(const char *hostname,
uint64_t hostnamelen);
static bool getLoadAverages(double *oneminuteaverage,
double *fiveminuteaverage,
double *fifteenminuteaverage);
static void sync();
static bool halt();
static bool shutDown();
static bool reboot();
static int64_t getMaxCommandLineArgumentLength();
static int64_t getMaxProcessesPerUser();
static int64_t getMaxHostNameLength();
static int64_t getMaxLoginNameLength();
static int64_t getClockTicksPerSecond();
static int64_t getMaxOpenFilesPerProcess();
static int32_t getPageSize();
static int32_t getAllocationGranularity();
static int64_t getMaxOpenStreamsPerProcess();
static int64_t getMaxSymlinkLoops();
static int64_t getMaxTerminalDeviceNameLength();
static int64_t getMaxTimezoneNameLength();
static int64_t getMaxLineLength();
static int64_t getPhysicalPageCount();
static int64_t getAvailablePhysicalPageCount();
static int64_t getProcessorCount();
static int64_t getMaxProcessorCount();
static int64_t getProcessorsOnline();
static int64_t getMaxSupplementalGroupsPerUser();
static int64_t getMaxDelayTimerExpirations();
static int64_t getMaxRealtimeSignals();
static int64_t getMaxSemaphoresPerProcess();
static int64_t getMaxSemaphoreValue();
static int64_t getMaxSignalQueueLength();
static int64_t getMaxTimersPerProcess();
static int64_t getSuggestedGroupEntryBufferSize();
static int64_t getSuggestedPasswordEntryBufferSize();
static int64_t getMinThreadStackSize();
static int64_t getMaxThreadsPerProcess();
static int64_t getThreadDestructorIterations();
static int64_t getMaxThreadKeys();
static int64_t getMaxAtExitFunctions();
static int64_t getCpuSetSize();
static int64_t getMaxPasswordLength();
static int64_t getMaxLogNameLength();
static int64_t getMaxProcessId();
static int64_t sysConf(int32_t name);
static bool signalsInterruptSystemCalls();
static char getDirectorySeparator();
static bool setProtection(unsigned char *ptr,
size_t size,
int32_t protection);
static bool sequentialAccess(unsigned char *ptr,
size_t size);
static bool randomAccess(unsigned char *ptr,
size_t size);
static bool willNeed(unsigned char *ptr, size_t size);
static bool wontNeed(unsigned char *ptr, size_t size);
static bool normalAccess(unsigned char *ptr, size_t size);
static bool lock(unsigned char *ptr, size_t size);
static bool unlock(unsigned char *ptr, size_t size);
static bool notPagedOut(unsigned char *ptr, size_t size);
static bool disablePaging();
static bool disablePagingOfCurrent();
static bool disablePagingOfNew();
static bool enablePaging();
#include <rudiments/private/sys.h>
};
#endif
sys
Definition: sys.h:12
sys::wontNeed
static bool wontNeed(unsigned char *ptr, size_t size)
sys::halt
static bool halt()
sys::getMaxSemaphoreValue
static int64_t getMaxSemaphoreValue()
sys::getAvailablePhysicalPageCount
static int64_t getAvailablePhysicalPageCount()
sys::getHostName
static char * getHostName()
sys::getPageSize
static int32_t getPageSize()
sys::getMaxProcessesPerUser
static int64_t getMaxProcessesPerUser()
sys::getCpuSetSize
static int64_t getCpuSetSize()
sys::getMaxSymlinkLoops
static int64_t getMaxSymlinkLoops()
sys::notPagedOut
static bool notPagedOut(unsigned char *ptr, size_t size)
sys::sequentialAccess
static bool sequentialAccess(unsigned char *ptr, size_t size)
sys::normalAccess
static bool normalAccess(unsigned char *ptr, size_t size)
sys::getDirectorySeparator
static char getDirectorySeparator()
sys::willNeed
static bool willNeed(unsigned char *ptr, size_t size)
sys::enablePaging
static bool enablePaging()
sys::getProcessorCount
static int64_t getProcessorCount()
sys::sysConf
static int64_t sysConf(int32_t name)
sys::getOperatingSystemArchitecture
static char * getOperatingSystemArchitecture()
sys::getOperatingSystemVersion
static char * getOperatingSystemVersion()
sys::getSuggestedGroupEntryBufferSize
static int64_t getSuggestedGroupEntryBufferSize()
sys::getThreadDestructorIterations
static int64_t getThreadDestructorIterations()
sys::unlock
static bool unlock(unsigned char *ptr, size_t size)
sys::getSuggestedPasswordEntryBufferSize
static int64_t getSuggestedPasswordEntryBufferSize()
sys::getMaxThreadKeys
static int64_t getMaxThreadKeys()
sys::getMinThreadStackSize
static int64_t getMinThreadStackSize()
sys::getProcessorsOnline
static int64_t getProcessorsOnline()
sys::lock
static bool lock(unsigned char *ptr, size_t size)
sys::getMaxOpenStreamsPerProcess
static int64_t getMaxOpenStreamsPerProcess()
sys::getLoadAverages
static bool getLoadAverages(double *oneminuteaverage, double *fiveminuteaverage, double *fifteenminuteaverage)
sys::getOperatingSystemName
static char * getOperatingSystemName()
sys::getRudimentsVersion
static const char * getRudimentsVersion()
sys::setHostName
static bool setHostName(const char *hostname, uint64_t hostnamelen)
sys::getMaxCommandLineArgumentLength
static int64_t getMaxCommandLineArgumentLength()
sys::sync
static void sync()
sys::getMaxLogNameLength
static int64_t getMaxLogNameLength()
sys::randomAccess
static bool randomAccess(unsigned char *ptr, size_t size)
sys::getMaxRealtimeSignals
static int64_t getMaxRealtimeSignals()
sys::getMaxProcessId
static int64_t getMaxProcessId()
sys::getMaxTimersPerProcess
static int64_t getMaxTimersPerProcess()
sys::getMaxThreadsPerProcess
static int64_t getMaxThreadsPerProcess()
sys::getMaxSupplementalGroupsPerUser
static int64_t getMaxSupplementalGroupsPerUser()
sys::getMaxPasswordLength
static int64_t getMaxPasswordLength()
sys::getPhysicalPageCount
static int64_t getPhysicalPageCount()
sys::getMaxSignalQueueLength
static int64_t getMaxSignalQueueLength()
sys::getMaxProcessorCount
static int64_t getMaxProcessorCount()
sys::getMaxLineLength
static int64_t getMaxLineLength()
sys::setHostName
static bool setHostName(const char *hostname)
sys::getMaxOpenFilesPerProcess
static int64_t getMaxOpenFilesPerProcess()
sys::disablePagingOfNew
static bool disablePagingOfNew()
sys::disablePaging
static bool disablePaging()
sys::getMaxLoginNameLength
static int64_t getMaxLoginNameLength()
sys::signalsInterruptSystemCalls
static bool signalsInterruptSystemCalls()
sys::getAllocationGranularity
static int32_t getAllocationGranularity()
sys::getMaxSemaphoresPerProcess
static int64_t getMaxSemaphoresPerProcess()
sys::getMaxDelayTimerExpirations
static int64_t getMaxDelayTimerExpirations()
sys::getOperatingSystemRelease
static char * getOperatingSystemRelease()
sys::disablePagingOfCurrent
static bool disablePagingOfCurrent()
sys::reboot
static bool reboot()
sys::getMaxAtExitFunctions
static int64_t getMaxAtExitFunctions()
sys::getMaxTimezoneNameLength
static int64_t getMaxTimezoneNameLength()
sys::getClockTicksPerSecond
static int64_t getClockTicksPerSecond()
sys::shutDown
static bool shutDown()
sys::getMaxTerminalDeviceNameLength
static int64_t getMaxTerminalDeviceNameLength()
sys::getMaxHostNameLength
static int64_t getMaxHostNameLength()
sys::setProtection
static bool setProtection(unsigned char *ptr, size_t size, int32_t protection)