Rudiments
sys.h
1 // Copyright (c) 2004 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 
9 class sysprivate;
10 
14 class RUDIMENTS_DLLSPEC sys {
15  public:
16 
19  static char *getOperatingSystemName();
20 
24  static char *getOperatingSystemRelease();
25 
29  static char *getOperatingSystemVersion();
30 
33  static char *getOperatingSystemArchitecture();
34 
39  static char *getHostName();
40 
43  static bool setHostName(const char *hostname);
44 
47  static bool setHostName(const char *hostname,
48  uint64_t hostnamelen);
49 
53  static bool getLoadAverages(double *oneminuteaverage,
54  double *fiveminuteaverage,
55  double *fifteenminuteaverage);
56 
58  static void sync();
59 
64  static bool halt();
65 
71  static bool shutDown();
72 
77  static bool reboot();
78 
81  static int64_t getMaxCommandLineArgumentLength();
82 
86  static int64_t getMaxProcessesPerUser();
87 
91  static int64_t getMaxHostNameLength();
92 
96  static int64_t getMaxLoginNameLength();
97 
106  static int64_t getClockTicksPerSecond();
107 
111  static int64_t getMaxOpenFilesPerProcess();
112 
115  static int32_t getPageSize();
116 
120  static int64_t getMaxOpenStreamsPerProcess();
121 
135  static int64_t getMaxSymlinkLoops();
136 
140  static int64_t getMaxTerminalDeviceNameLength();
141 
144  static int64_t getMaxTimezoneNameLength();
145 
150  static int64_t getMaxLineLength();
151 
155  static int64_t getPhysicalPageCount();
156 
160  static int64_t getAvailablePhysicalPageCount();
161 
165  static int64_t getProcessorCount();
166 
170  static int64_t getMaxProcessorCount();
171 
174  static int64_t getProcessorsOnline();
175 
179  static int64_t getMaxSupplementalGroupsPerUser();
180 
184  static int64_t getMaxDelayTimerExpirations();
185 
189  static int64_t getMaxRealtimeSignals();
190 
194  static int64_t getMaxSemaphoresPerProcess();
195 
198  static int64_t getMaxSemaphoreValue();
199 
203  static int64_t getMaxSignalQueueLength();
204 
208  static int64_t getMaxTimersPerProcess();
209 
215  static int64_t getSuggestedGroupEntryBufferSize();
216 
222  static int64_t getSuggestedPasswordEntryBufferSize();
223 
226  static int64_t getMinThreadStackSize();
227 
231  static int64_t getMaxThreadsPerProcess();
232 
236  static int64_t getThreadDestructorIterations();
237 
240  static int64_t getMaxThreadKeys();
241 
245  static int64_t getMaxAtExitFunctions();
246 
250  static int64_t getCPUSetSize();
251 
254  static int64_t getMaxPasswordLength();
255 
258  static int64_t getMaxLogNameLength();
259 
262  static int64_t getMaxProcessID();
263 
266  static int64_t sysConf(int32_t name);
267 
268  #include <rudiments/private/sys.h>
269 };
270 
271 #endif