summaryrefslogtreecommitdiffstats
path: root/darwin/PlatformHelpers.h
diff options
context:
space:
mode:
authorAlexander Momchilov <alexandermomchilov@gmail.com>2021-09-23 19:39:13 -0400
committerAlexander Momchilov <alexandermomchilov@gmail.com>2021-09-26 10:58:47 -0400
commitd527bc9132c2adf94666dc5b9593609d357ea1e4 (patch)
tree758baa0f5c2fd7b74bd78e8f434b30dab6ff3f8a /darwin/PlatformHelpers.h
parentdadcb87ad0a72555c4797a0eeaafb3236bf50295 (diff)
Refactor Platform_CompareKernelVersion API
Diffstat (limited to 'darwin/PlatformHelpers.h')
-rw-r--r--darwin/PlatformHelpers.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/darwin/PlatformHelpers.h b/darwin/PlatformHelpers.h
index 25c5dcc0..f78ca4ea 100644
--- a/darwin/PlatformHelpers.h
+++ b/darwin/PlatformHelpers.h
@@ -11,18 +11,23 @@ in the source distribution for its full text.
#include <sys/types.h>
-struct kern {
- short int version[3];
-};
+typedef struct KernelVersion {
+ short int major;
+ short int minor;
+ short int patch;
+} KernelVersion;
-void Platform_GetKernelVersion(struct kern* k);
+void Platform_GetKernelVersion(KernelVersion* k);
/* compare the given os version with the one installed returns:
0 if equals the installed version
positive value if less than the installed version
negative value if more than the installed version
*/
-int Platform_CompareKernelVersion(short int major, short int minor, short int component);
+int Platform_CompareKernelVersion(KernelVersion v);
+
+// lowerBound <= currentVersion < upperBound
+bool Platform_KernelVersionIsBetween(KernelVersion lowerBound, KernelVersion upperBound);
double Platform_calculateNanosecondsPerMachTick(void);

© 2014-2024 Faster IT GmbH | imprint | privacy policy