Rudiments: /home/dmuse/temp/rudiments/include/rudiments/sys.h Source File

Rudiments

sys.h
1 // Copyright (c) 1999-2018 David Muse
2 // See the COPYING file for more information.
3
4 #ifndef RUDIMENTS_SYS_H
5 #define RUDIMENTS_SYS_H
6
7 #include <rudiments/private/sysincludes.h>
8
12 class RUDIMENTS_DLLSPEC sys {
13 public:
14
17 static char *getOperatingSystemName();
18
22 static char *getOperatingSystemRelease();
23
27 static char *getOperatingSystemVersion();
28
31 static char *getOperatingSystemArchitecture();
32
34 static const char *getRudimentsVersion();
35
40 static char *getHostName();
41
44 static bool setHostName(const char *hostname);
45
48 static bool setHostName(const char *hostname,
49 uint64_t hostnamelen);
50
54 static bool getLoadAverages(double *oneminuteaverage,
55 double *fiveminuteaverage,
56 double *fifteenminuteaverage);
57
59 static void sync();
60
65 static bool halt();
66
72 static bool shutDown();
73
78 static bool reboot();
79
82 static int64_t getMaxCommandLineArgumentLength();
83
87 static int64_t getMaxProcessesPerUser();
88
92 static int64_t getMaxHostNameLength();
93
97 static int64_t getMaxLoginNameLength();
98
107 static int64_t getClockTicksPerSecond();
108
112 static int64_t getMaxOpenFilesPerProcess();
113
121 static int32_t getPageSize();
122
129 static int32_t getAllocationGranularity();
130
134 static int64_t getMaxOpenStreamsPerProcess();
135
149 static int64_t getMaxSymlinkLoops();
150
154 static int64_t getMaxTerminalDeviceNameLength();
155
158 static int64_t getMaxTimezoneNameLength();
159
164 static int64_t getMaxLineLength();
165
169 static int64_t getPhysicalPageCount();
170
174 static int64_t getAvailablePhysicalPageCount();
175
179 static int64_t getProcessorCount();
180
184 static int64_t getMaxProcessorCount();
185
188 static int64_t getProcessorsOnline();
189
193 static int64_t getMaxSupplementalGroupsPerUser();
194
198 static int64_t getMaxDelayTimerExpirations();
199
203 static int64_t getMaxRealtimeSignals();
204
208 static int64_t getMaxSemaphoresPerProcess();
209
212 static int64_t getMaxSemaphoreValue();
213
217 static int64_t getMaxSignalQueueLength();
218
222 static int64_t getMaxTimersPerProcess();
223
229 static int64_t getSuggestedGroupEntryBufferSize();
230
236 static int64_t getSuggestedPasswordEntryBufferSize();
237
241 static int64_t getMinThreadStackSize();
242
246 static int64_t getMaxThreadsPerProcess();
247
251 static int64_t getThreadDestructorIterations();
252
255 static int64_t getMaxThreadKeys();
256
260 static int64_t getMaxAtExitFunctions();
261
265 static int64_t getCpuSetSize();
266
269 static int64_t getMaxPasswordLength();
270
273 static int64_t getMaxLogNameLength();
274
278 static int64_t getMaxProcessId();
279
282 static int64_t sysConf(int32_t name);
283
287 static bool signalsInterruptSystemCalls();
288
291 static char getDirectorySeparator();
292
309 static bool setProtection(unsigned char *ptr,
310 size_t size,
311 int32_t protection);
312
321 static bool sequentialAccess(unsigned char *ptr,
322 size_t size);
323
332 static bool randomAccess(unsigned char *ptr,
333 size_t size);
334
343 static bool willNeed(unsigned char *ptr, size_t size);
344
354 static bool wontNeed(unsigned char *ptr, size_t size);
355
365 static bool normalAccess(unsigned char *ptr, size_t size);
366
374 static bool lock(unsigned char *ptr, size_t size);
375
383 static bool unlock(unsigned char *ptr, size_t size);
384
393 static bool notPagedOut(unsigned char *ptr, size_t size);
394
395
403 static bool disablePaging();
404
412 static bool disablePagingOfCurrent();
413
422 static bool disablePagingOfNew();
423
431 static bool enablePaging();
432
433 #include <rudiments/private/sys.h>
434 };
435
436 #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)