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 
36  static const char *getRudimentsVersion();
37 
42  static char *getHostName();
43 
46  static bool setHostName(const char *hostname);
47 
50  static bool setHostName(const char *hostname,
51  uint64_t hostnamelen);
52 
56  static bool getLoadAverages(double *oneminuteaverage,
57  double *fiveminuteaverage,
58  double *fifteenminuteaverage);
59 
61  static void sync();
62 
67  static bool halt();
68 
74  static bool shutDown();
75 
80  static bool reboot();
81 
84  static int64_t getMaxCommandLineArgumentLength();
85 
89  static int64_t getMaxProcessesPerUser();
90 
94  static int64_t getMaxHostNameLength();
95 
99  static int64_t getMaxLoginNameLength();
100 
109  static int64_t getClockTicksPerSecond();
110 
114  static int64_t getMaxOpenFilesPerProcess();
115 
123  static int32_t getPageSize();
124 
131  static int32_t getAllocationGranularity();
132 
136  static int64_t getMaxOpenStreamsPerProcess();
137 
151  static int64_t getMaxSymlinkLoops();
152 
156  static int64_t getMaxTerminalDeviceNameLength();
157 
160  static int64_t getMaxTimezoneNameLength();
161 
166  static int64_t getMaxLineLength();
167 
171  static int64_t getPhysicalPageCount();
172 
176  static int64_t getAvailablePhysicalPageCount();
177 
181  static int64_t getProcessorCount();
182 
186  static int64_t getMaxProcessorCount();
187 
190  static int64_t getProcessorsOnline();
191 
195  static int64_t getMaxSupplementalGroupsPerUser();
196 
200  static int64_t getMaxDelayTimerExpirations();
201 
205  static int64_t getMaxRealtimeSignals();
206 
210  static int64_t getMaxSemaphoresPerProcess();
211 
214  static int64_t getMaxSemaphoreValue();
215 
219  static int64_t getMaxSignalQueueLength();
220 
224  static int64_t getMaxTimersPerProcess();
225 
231  static int64_t getSuggestedGroupEntryBufferSize();
232 
238  static int64_t getSuggestedPasswordEntryBufferSize();
239 
242  static int64_t getMinThreadStackSize();
243 
247  static int64_t getMaxThreadsPerProcess();
248 
252  static int64_t getThreadDestructorIterations();
253 
256  static int64_t getMaxThreadKeys();
257 
261  static int64_t getMaxAtExitFunctions();
262 
266  static int64_t getCpuSetSize();
267 
270  static int64_t getMaxPasswordLength();
271 
274  static int64_t getMaxLogNameLength();
275 
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 };
293 
294 #endif
Definition: sys.h:14