mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-15 08:10:07 +02:00
57 lines
1.5 KiB
Plaintext
57 lines
1.5 KiB
Plaintext
From eaf2054190c9841dc5bf27a0a508e7ad4d36e157 Mon Sep 17 00:00:00 2001
|
|
From: Augustin Cavalier <waddlesplash@gmail.com>
|
|
Date: Sat, 16 Sep 2017 12:25:48 +0200
|
|
Subject: Add minimal Haiku support; based on Adrien's patch.
|
|
|
|
|
|
diff --git a/src/util.cc b/src/util.cc
|
|
index ef5f103..a6471d7 100644
|
|
--- a/src/util.cc
|
|
+++ b/src/util.cc
|
|
@@ -727,7 +727,7 @@ int GetProcessorCount() {
|
|
#endif
|
|
}
|
|
|
|
-#if defined(_WIN32) || defined(__CYGWIN__)
|
|
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(__HAIKU__)
|
|
static double CalculateProcessorLoad(uint64_t idle_ticks, uint64_t total_ticks)
|
|
{
|
|
static uint64_t previous_idle_ticks = 0;
|
|
--
|
|
2.30.2
|
|
|
|
|
|
From cd6610b3ba4981ee7a844a8148758940745ad9a8 Mon Sep 17 00:00:00 2001
|
|
From: Jerome Duval <jerome.duval@gmail.com>
|
|
Date: Sat, 16 Sep 2017 12:48:42 +0200
|
|
Subject: GetLoadAvg to be implemented for Haiku
|
|
|
|
|
|
diff --git a/src/util.cc b/src/util.cc
|
|
index a6471d7..55735f6 100644
|
|
--- a/src/util.cc
|
|
+++ b/src/util.cc
|
|
@@ -727,7 +727,7 @@ int GetProcessorCount() {
|
|
#endif
|
|
}
|
|
|
|
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(__HAIKU__)
|
|
+#if defined(_WIN32) || defined(__CYGWIN__)
|
|
static double CalculateProcessorLoad(uint64_t idle_ticks, uint64_t total_ticks)
|
|
{
|
|
static uint64_t previous_idle_ticks = 0;
|
|
@@ -818,6 +818,10 @@ double GetLoadAverage() {
|
|
double GetLoadAverage() {
|
|
return -0.0f;
|
|
}
|
|
+#elif defined(__HAIKU__)
|
|
+double GetLoadAverage() {
|
|
+ return -0.0f;
|
|
+}
|
|
#else
|
|
double GetLoadAverage() {
|
|
double loadavg[3] = { 0.0f, 0.0f, 0.0f };
|
|
--
|
|
2.30.2
|
|
|