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
11class RUDIMENTS_DLLSPEC sys {
12 public:
13
16 static char *getOperatingSystemName();
17
22
27
31
35 static bool isBigEndian();
36
38 static const char *getRudimentsVersion();
39
44 static char *getHostName();
45
48 static bool setHostName(const char *hostname);
49
52 static bool setHostName(const char *hostname,
54
58 static bool getLoadAverages(double *oneminuteaverage,
59 double *fiveminuteaverage,
60 double *fifteenminuteaverage);
61
63 static void sync();
64
69 static bool halt();
70
76 static bool shutDown();
77
82 static bool reboot();
83
87
92
97
102
112
117
126
134
139
154
159
163
169
174
179
184
189
194
199
204
209
213
218
223
228
233
237
242
247
254
261
266
271
276
280
285
290
294
298
303
307
312
316
333 static bool setProtection(byte_t *ptr, size_t size,
335
345 byte_t *ptr, size_t size);
346
355 static bool adviseRandomAccess(byte_t *ptr, size_t size);
356
365 static bool adviseWillNeed(byte_t *ptr, size_t size);
366
376 static bool adviseWontNeed(byte_t *ptr, size_t size);
377
387 static bool adviseNormalAccess(byte_t *ptr, size_t size);
388
396 static bool disablePaging(byte_t *ptr, size_t size);
397
405 static bool enablePaging(byte_t *ptr, size_t size);
406
415 static bool getNotPagedOut(byte_t *ptr, size_t size);
416
417
425 static bool disablePaging();
426
435
444 static bool disablePagingOfNew();
445
453 static bool enablePaging();
454
455
458 static size_t getMinSizeT();
459
462 static size_t getMaxSizeT();
463
466 static ssize_t getMinSSizeT();
467
470 static ssize_t getMaxSSizeT();
471
474 static off64_t getMinOff64T();
475
478 static off64_t getMaxOff64T();
479
480 #include <rudiments/private/sys.h>
481};
482
483#include <rudiments/private/sysinlines.h>
484
485#endif
Definition avltree.h:11
Definition sys.h:11
static int64_t getUsedPhysicalMemorySize()
static bool halt()
static int64_t getMaxSemaphoreValue()
static int64_t getAvailablePhysicalPageCount()
static bool isBigEndian()
static int32_t getPageSize()
static int64_t getMaxProcessesPerUser()
static int64_t getCpuSetSize()
static int64_t getMaxSymlinkLoops()
static bool adviseSequentialAccess(byte_t *ptr, size_t size)
static char getDirectorySeparator()
static int64_t getAvailablePhysicalMemorySize()
static const char * getRudimentsVersion()
static bool enablePaging(byte_t *ptr, size_t size)
static char * getOperatingSystemName()
static bool enablePaging()
static bool getNotPagedOut(byte_t *ptr, size_t size)
static int64_t getProcessorCount()
static int64_t sysConf(int32_t name)
static bool disablePaging(byte_t *ptr, size_t size)
static char * getOperatingSystemVersion()
static bool adviseRandomAccess(byte_t *ptr, size_t size)
static int64_t getSuggestedGroupEntryBufferSize()
static char * getHostName()
static bool adviseWillNeed(byte_t *ptr, size_t size)
static int64_t getThreadDestructorIterations()
static int64_t getSuggestedPasswordEntryBufferSize()
static int64_t getMaxThreadKeys()
static int64_t getMinThreadStackSize()
static int64_t getProcessorsOnline()
static int64_t getMaxOpenStreamsPerProcess()
static bool getLoadAverages(double *oneminuteaverage, double *fiveminuteaverage, double *fifteenminuteaverage)
static bool setHostName(const char *hostname, uint64_t hostnamelen)
static int64_t getMaxCommandLineArgumentLength()
static void sync()
static int64_t getMaxLogNameLength()
static int64_t getMaxRealtimeSignals()
static int64_t getMaxProcessId()
static int64_t getMaxTimersPerProcess()
static int64_t getMaxThreadsPerProcess()
static int64_t getMaxSupplementalGroupsPerUser()
static int64_t getMaxPasswordLength()
static bool getSignalsInterruptSystemCalls()
static int64_t getPhysicalPageCount()
static char * getOperatingSystemRelease()
static int64_t getMaxSignalQueueLength()
static int64_t getMaxProcessorCount()
static int64_t getMaxLineLength()
static bool setHostName(const char *hostname)
static int64_t getUsedPhysicalPageCount()
static int64_t getMaxOpenFilesPerProcess()
static bool disablePagingOfNew()
static bool disablePaging()
static int64_t getMaxLoginNameLength()
static int32_t getAllocationGranularity()
static int64_t getMaxSemaphoresPerProcess()
static bool adviseNormalAccess(byte_t *ptr, size_t size)
static int64_t getMaxDelayTimerExpirations()
static int64_t getPhysicalMemorySize()
static bool disablePagingOfCurrent()
static bool reboot()
static int64_t getMaxAtExitFunctions()
static int64_t getMaxTimezoneNameLength()
static bool setProtection(byte_t *ptr, size_t size, int32_t protection)
static int64_t getClockTicksPerSecond()
static bool shutDown()
static int64_t getMaxTerminalDeviceNameLength()
static int64_t getMaxHostNameLength()
static bool adviseWontNeed(byte_t *ptr, size_t size)
static char * getOperatingSystemArchitecture()