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 
120  static int32_t getPageSize();
121 
128  static int32_t getAllocationGranularity();
129 
133  static int64_t getMaxOpenStreamsPerProcess();
134 
148  static int64_t getMaxSymlinkLoops();
149 
153  static int64_t getMaxTerminalDeviceNameLength();
154 
157  static int64_t getMaxTimezoneNameLength();
158 
163  static int64_t getMaxLineLength();
164 
168  static int64_t getPhysicalPageCount();
169 
173  static int64_t getAvailablePhysicalPageCount();
174 
178  static int64_t getProcessorCount();
179 
183  static int64_t getMaxProcessorCount();
184 
187  static int64_t getProcessorsOnline();
188 
192  static int64_t getMaxSupplementalGroupsPerUser();
193 
197  static int64_t getMaxDelayTimerExpirations();
198 
202  static int64_t getMaxRealtimeSignals();
203 
207  static int64_t getMaxSemaphoresPerProcess();
208 
211  static int64_t getMaxSemaphoreValue();
212 
216  static int64_t getMaxSignalQueueLength();
217 
221  static int64_t getMaxTimersPerProcess();
222 
228  static int64_t getSuggestedGroupEntryBufferSize();
229 
235  static int64_t getSuggestedPasswordEntryBufferSize();
236 
239  static int64_t getMinThreadStackSize();
240 
244  static int64_t getMaxThreadsPerProcess();
245 
249  static int64_t getThreadDestructorIterations();
250 
253  static int64_t getMaxThreadKeys();
254 
258  static int64_t getMaxAtExitFunctions();
259 
263  static int64_t getCpuSetSize();
264 
267  static int64_t getMaxPasswordLength();
268 
271  static int64_t getMaxLogNameLength();
272 
275  static int64_t getMaxProcessId();
276 
279  static int64_t sysConf(int32_t name);
280 
284  static bool signalsInterruptSystemCalls();
285 
288  static char getDirectorySeparator();
289 };
290 
291 #endif
Definition: sys.h:14