4 #ifndef RUDIMENTS_SYS_H 5 #define RUDIMENTS_SYS_H 7 #include <rudiments/private/sysincludes.h> 12 class RUDIMENTS_DLLSPEC
sys {
17 static char *getOperatingSystemName();
22 static char *getOperatingSystemRelease();
27 static char *getOperatingSystemVersion();
31 static char *getOperatingSystemArchitecture();
34 static const char *getRudimentsVersion();
40 static char *getHostName();
44 static bool setHostName(
const char *hostname);
48 static bool setHostName(
const char *hostname,
49 uint64_t hostnamelen);
54 static bool getLoadAverages(
double *oneminuteaverage,
55 double *fiveminuteaverage,
56 double *fifteenminuteaverage);
72 static bool shutDown();
82 static int64_t getMaxCommandLineArgumentLength();
87 static int64_t getMaxProcessesPerUser();
92 static int64_t getMaxHostNameLength();
97 static int64_t getMaxLoginNameLength();
107 static int64_t getClockTicksPerSecond();
112 static int64_t getMaxOpenFilesPerProcess();
121 static int32_t getPageSize();
129 static int32_t getAllocationGranularity();
134 static int64_t getMaxOpenStreamsPerProcess();
149 static int64_t getMaxSymlinkLoops();
154 static int64_t getMaxTerminalDeviceNameLength();
158 static int64_t getMaxTimezoneNameLength();
164 static int64_t getMaxLineLength();
169 static int64_t getPhysicalPageCount();
174 static int64_t getAvailablePhysicalPageCount();
179 static int64_t getProcessorCount();
184 static int64_t getMaxProcessorCount();
188 static int64_t getProcessorsOnline();
193 static int64_t getMaxSupplementalGroupsPerUser();
198 static int64_t getMaxDelayTimerExpirations();
203 static int64_t getMaxRealtimeSignals();
208 static int64_t getMaxSemaphoresPerProcess();
212 static int64_t getMaxSemaphoreValue();
217 static int64_t getMaxSignalQueueLength();
222 static int64_t getMaxTimersPerProcess();
229 static int64_t getSuggestedGroupEntryBufferSize();
236 static int64_t getSuggestedPasswordEntryBufferSize();
240 static int64_t getMinThreadStackSize();
245 static int64_t getMaxThreadsPerProcess();
250 static int64_t getThreadDestructorIterations();
254 static int64_t getMaxThreadKeys();
259 static int64_t getMaxAtExitFunctions();
264 static int64_t getCpuSetSize();
268 static int64_t getMaxPasswordLength();
272 static int64_t getMaxLogNameLength();
276 static int64_t getMaxProcessId();
280 static int64_t sysConf(int32_t name);
285 static bool signalsInterruptSystemCalls();
289 static char getDirectorySeparator();
307 static bool setProtection(
unsigned char *ptr,
319 static bool sequentialAccess(
unsigned char *ptr,
330 static bool randomAccess(
unsigned char *ptr,
341 static bool willNeed(
unsigned char *ptr,
size_t len);
352 static bool wontNeed(
unsigned char *ptr,
size_t len);
363 static bool normalAccess(
unsigned char *ptr,
size_t len);
372 static bool lock(
unsigned char *ptr,
size_t len);
381 static bool unlock(
unsigned char *ptr,
size_t len);
391 static bool notPagedOut(
unsigned char *ptr,
size_t len);
401 static bool disablePaging();
410 static bool disablePagingOfCurrent();
420 static bool disablePagingOfNew();
429 static bool enablePaging();
431 #include <rudiments/private/sys.h>