diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-01-12 16:31:10 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-01-12 16:31:10 +0900 |
| commit | 7a8800713d7d28851a5f355df911ffaf5f338809 (patch) | |
| tree | 22b1896cea5f0f2a90aadeb1efc55d4f4b6a26ef /kicker-applets/ktimemon/sample.cpp | |
| parent | 19ddf7146753bb06218e2af3366cb0b07aa1326f (diff) | |
| download | tdeaddons-7a8800713d7d28851a5f355df911ffaf5f338809.tar.gz tdeaddons-7a8800713d7d28851a5f355df911ffaf5f338809.zip | |
Remove support for OSF
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kicker-applets/ktimemon/sample.cpp')
| -rw-r--r-- | kicker-applets/ktimemon/sample.cpp | 45 |
1 files changed, 4 insertions, 41 deletions
diff --git a/kicker-applets/ktimemon/sample.cpp b/kicker-applets/ktimemon/sample.cpp index 5864583..a57a7c6 100644 --- a/kicker-applets/ktimemon/sample.cpp +++ b/kicker-applets/ktimemon/sample.cpp @@ -24,9 +24,7 @@ #include <fstream> #include <stdio.h> -#ifdef __osf__ -#include <sys/table.h> -#elif defined(USE_SOLARIS) +#if defined(USE_SOLARIS) #include <kstat.h> #include <sys/sysinfo.h> #include <sys/stat.h> @@ -42,7 +40,7 @@ // -- global definitions ------------------------------------------------- -#if defined(__osf__) || defined(USE_SOLARIS) +#if defined(USE_SOLARIS) extern "C" int getpagesize(); // argh, have to define prototype! #endif @@ -130,7 +128,7 @@ KSample::KSample(KTimeMon *t, bool a, unsigned p, unsigned s, unsigned c) : } #endif -#if defined(USE_SOLARIS) || defined(__osf__) +#if defined(USE_SOLARIS) pagesPerMB = (1024*1024) / getpagesize(); if (pagesPerMB == 0) pagesPerMB = 1; // paranoia sanity check #endif @@ -261,41 +259,6 @@ void KSample::readSample() } sample.cpus = l; -#elif defined(__osf__) // in OSF/2, we can use table() - - TQString msg = i18n("Unable to obtain system information.\n" - "The table(2) system call returned an error " - "for table %1.\n" - "Please contact the maintainer at mueller@kde.org " - "who will try to figure out what went wrong."); - - struct tbl_sysinfo sysinfo; - if (table(TBL_SYSINFO, 0, &sysinfo, 1, sizeof(sysinfo)) != 1) - fatal(msg.arg("TBL_SYSINFO")); - - sample.user = sysinfo.si_user; - sample.nice = sysinfo.si_nice; - sample.kernel = sysinfo.si_sys; - sample.iowait = sysinfo.wait; - sample.idle = sysinfo.si_idle; - - struct tbl_vmstats vmstats; - if (table(TBL_VMSTATS, 0, &vmstats, 1, sizeof(vmstats)) != 1) - fatal(msg.arg("TBL_VMSTATS")); - - sample.mtotal = vmstats.free_count + vmstats.active_count + - vmstats.inactive_count + vmstats.wire_count; - sample.free = vmstats.free_count; - sample.buffers = vmstats.inactive_count; // pages not used for some time - sample.cached = vmstats.wire_count; // kernel/driver memory - - struct tbl_swapinfo swapinfo; - if (table(TBL_SWAPINFO, -1, &swapinfo, 1, sizeof(swapinfo)) != 1) - fatal(msg.arg("TBL_SWAPINFO")); - - sample.stotal = swapinfo.size; - sample.sfree = swapinfo.free; - #elif defined(USE_SOLARIS) kstat_t *ksp; @@ -441,7 +404,7 @@ inline void KSample::makeMBytes(unsigned long &v) { #ifdef __linux__ v /= 1024; // can it be simpler ;-) -#elif defined (__osf__) || defined(USE_SOLARIS) +#elif defined(USE_SOLARIS) v /= pagesPerMB; #endif } |
