diff options
author | wiz <wiz@pkgsrc.org> | 2000-06-16 23:40:16 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2000-06-16 23:40:16 +0000 |
commit | e896e9986339fb1a633d6315d1bdfe64417ad3e7 (patch) | |
tree | 8ea70f2acbd2cfa4e1a1768a61c8ba582c3f4cd6 /parallel/glunix/patches | |
parent | d734f7e4ba2c5758af9d38b2945e3670ba10525d (diff) | |
download | pkgsrc-e896e9986339fb1a633d6315d1bdfe64417ad3e7.tar.gz |
Apply patches provided in pkg/10355 by Gabriel Rosenkoetter
<gr@sirius.eclipsed.net>. Also fix compilation on -current machines
after removal of vm/vm_swap.h, and silence a compile time warning.
Diffstat (limited to 'parallel/glunix/patches')
-rw-r--r-- | parallel/glunix/patches/patch-aj | 36 | ||||
-rw-r--r-- | parallel/glunix/patches/patch-bg | 12 | ||||
-rw-r--r-- | parallel/glunix/patches/patch-bo | 8 | ||||
-rw-r--r-- | parallel/glunix/patches/patch-cf | 13 |
4 files changed, 42 insertions, 27 deletions
diff --git a/parallel/glunix/patches/patch-aj b/parallel/glunix/patches/patch-aj index 6b8780009d4..3f6a0cafa9c 100644 --- a/parallel/glunix/patches/patch-aj +++ b/parallel/glunix/patches/patch-aj @@ -1,8 +1,8 @@ -$NetBSD: patch-aj,v 1.2 2000/05/27 09:53:37 wiz Exp $ +$NetBSD: patch-aj,v 1.3 2000/06/16 23:40:17 wiz Exp $ --- glunix/src/idle/didle_sysinfo.cc.orig Thu Sep 18 21:04:55 1997 -+++ glunix/src/idle/didle_sysinfo.cc Fri May 26 14:44:45 2000 -@@ -95,14 +95,29 @@ ++++ glunix/src/idle/didle_sysinfo.cc Sat Jun 17 01:07:46 2000 +@@ -95,14 +95,33 @@ #include <kvm.h> #include <nlist.h> #include <stdio.h> @@ -13,7 +13,11 @@ $NetBSD: patch-aj,v 1.2 2000/05/27 09:53:37 wiz Exp $ +#include <sys/param.h> +#include <sys/proc.h> +#include <miscfs/procfs/procfs.h> ++#if __NetBSD_Version__ < 104000200 +#include <vm/vm_swap.h> ++#else /* moved to sys in 1.4.2 */ ++#include <sys/swap.h> ++#endif +#include <sys/sysctl.h> +#else #include <sys/proc.h> @@ -32,7 +36,7 @@ $NetBSD: patch-aj,v 1.2 2000/05/27 09:53:37 wiz Exp $ #include "clist.h" #include "cidle.h" -@@ -120,12 +135,51 @@ +@@ -120,12 +139,51 @@ #define LOADDOUBLE(la) ((double)(la) / FSCALE) #define HASH(x) ((x) >> 1) @@ -85,7 +89,7 @@ $NetBSD: patch-aj,v 1.2 2000/05/27 09:53:37 wiz Exp $ /* definitions for indices in the nlist array */ #define X_AVENRUN 0 #define X_MPID 1 -@@ -165,11 +219,11 @@ +@@ -165,11 +223,11 @@ // These are offsets into kmem for the stats we need static ulong avenrunOffset, availrmemOffset, anoninfoOffset, swapfsOffset; @@ -99,7 +103,7 @@ $NetBSD: patch-aj,v 1.2 2000/05/27 09:53:37 wiz Exp $ static int cpuStates[NUM_CPUSTATES]; static int memoryStats[5]; static char *cpuStateNames[] = -@@ -237,6 +291,45 @@ +@@ -237,6 +295,45 @@ * * Side effects: *****************************************************************************/ @@ -145,7 +149,7 @@ $NetBSD: patch-aj,v 1.2 2000/05/27 09:53:37 wiz Exp $ Bool Idle_InitializeSysinfo(void) { -@@ -301,7 +394,7 @@ +@@ -301,7 +398,7 @@ return True; } @@ -154,7 +158,7 @@ $NetBSD: patch-aj,v 1.2 2000/05/27 09:53:37 wiz Exp $ /****************************************************************************** * Idle_CleanupSysinfo -- * Description of purpose and function of the procedure -@@ -333,18 +426,30 @@ +@@ -333,18 +430,30 @@ * * Side effects: *****************************************************************************/ @@ -186,7 +190,7 @@ $NetBSD: patch-aj,v 1.2 2000/05/27 09:53:37 wiz Exp $ /* Has this pid been recycled? Are we hitting a very old process? If so, then reset the entry */ if (usage < candidate->cpuUsage) { -@@ -353,7 +458,11 @@ +@@ -353,7 +462,11 @@ return candidate; } if (candidate->pid == -1) { @@ -198,7 +202,7 @@ $NetBSD: patch-aj,v 1.2 2000/05/27 09:53:37 wiz Exp $ candidate->cpuUsage = 0; return candidate; } -@@ -379,10 +488,17 @@ +@@ -379,10 +492,17 @@ * * Side effects: *****************************************************************************/ @@ -216,7 +220,7 @@ $NetBSD: patch-aj,v 1.2 2000/05/27 09:53:37 wiz Exp $ ASSERT(entry != NULL); entry->cpuUsage = usage; } -@@ -408,12 +524,24 @@ +@@ -408,12 +528,24 @@ void Idle_GetSysInfo(Idle_Load *total, Idle_Load *seq, List_List *glunixProcs) { @@ -241,7 +245,7 @@ $NetBSD: patch-aj,v 1.2 2000/05/27 09:53:37 wiz Exp $ static struct timeval lastTime = {0, 0}; struct timeval currTime; double alpha, beta; -@@ -459,6 +587,33 @@ +@@ -459,6 +591,33 @@ vmInUse[TOTAL] = 0; vmInUse[SEQUENTIAL] = 0; cpuUsage[TOTAL] = 0; cpuUsage[SEQUENTIAL] = 0; numProcs = 0; @@ -275,7 +279,7 @@ $NetBSD: patch-aj,v 1.2 2000/05/27 09:53:37 wiz Exp $ rewinddir(procdir); while ((direntp = readdir(procdir)) != 0) { -@@ -493,6 +648,7 @@ +@@ -493,6 +652,7 @@ (void) close(fd); numProcs++; } @@ -283,7 +287,7 @@ $NetBSD: patch-aj,v 1.2 2000/05/27 09:53:37 wiz Exp $ total->mem = activeMemory[TOTAL]; total->cpu = cpuUsage[TOTAL]; seq->mem = activeMemory[SEQUENTIAL]; -@@ -503,10 +659,21 @@ +@@ -503,10 +663,21 @@ void Idle_GetSystemInfo(Idle_SystemLoad *sysLoad) { @@ -307,7 +311,7 @@ $NetBSD: patch-aj,v 1.2 2000/05/27 09:53:37 wiz Exp $ if (kd == NULL) { sysLoad->loadAvg[0] = 0; -@@ -515,7 +682,48 @@ +@@ -515,7 +686,48 @@ sysLoad->memory = 0; return; } @@ -356,7 +360,7 @@ $NetBSD: patch-aj,v 1.2 2000/05/27 09:53:37 wiz Exp $ /* get load average array */ ReadKernelData(avenrunOffset, (char *) avenrun, sizeof (avenrun)); // -@@ -539,6 +747,7 @@ +@@ -539,6 +751,7 @@ sysLoad->memory = PAGETOK(MAX(ani_max - ani_resv, 0) + availrmem - swapfs_minfree); diff --git a/parallel/glunix/patches/patch-bg b/parallel/glunix/patches/patch-bg index f19b938918d..edab732da63 100644 --- a/parallel/glunix/patches/patch-bg +++ b/parallel/glunix/patches/patch-bg @@ -1,7 +1,7 @@ -$NetBSD: patch-bg,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $ +$NetBSD: patch-bg,v 1.2 2000/06/16 23:40:18 wiz Exp $ ---- progs/glupart/glupart_script.pl.orig Wed Nov 5 15:30:11 1997 -+++ progs/glupart/glupart_script.pl Thu Apr 2 21:55:30 1998 +--- progs/glupart/glupart_script.pl.orig Wed Nov 5 17:30:11 1997 ++++ progs/glupart/glupart_script.pl Tue Jun 13 13:13:12 2000 @@ -75,3 +75,3 @@ my $gl_tmpFile = "$gl_dataDir/.__glupart$$-tmp"; -my $gl_emailAdmin = "glunix-admin\@now.CS.Berkeley.EDU"; @@ -27,10 +27,8 @@ $NetBSD: patch-bg,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $ print "Created file $f\n"; + system("/usr/sbin/chown glunix:glunix $f"); } -@@ -1995,3 +1997,5 @@ +@@ -1995,3 +1997,3 @@ if ($command eq "install") { - if ($> != 0) { -+ if ($> != 0 && $< == 0) { -+ ($<,$>) = ($>,$<); -+ } else { ++ if ($< != 0) { print STDERR "You must be root to do \"glupart install\"\n"; diff --git a/parallel/glunix/patches/patch-bo b/parallel/glunix/patches/patch-bo index 455614df8e7..d3c284e5082 100644 --- a/parallel/glunix/patches/patch-bo +++ b/parallel/glunix/patches/patch-bo @@ -1,7 +1,7 @@ -$NetBSD: patch-bo,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $ +$NetBSD: patch-bo,v 1.2 2000/06/16 23:40:18 wiz Exp $ ---- progs/glupart/glupart.c.orig Thu Sep 18 14:01:35 1997 -+++ progs/glupart/glupart.c Thu Apr 9 11:37:35 1998 +--- progs/glupart/glupart.c.orig Thu Sep 18 17:01:35 1997 ++++ progs/glupart/glupart.c Tue Jun 13 14:44:12 2000 @@ -1,18 +1,40 @@ #include <stdio.h> #include <sys/types.h> @@ -24,7 +24,7 @@ $NetBSD: patch-bo,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $ +#endif -#define progPath "/usr/now/bin/glupart_script" -+#define progPath "%%%NOW_ROOT%%%/now/bin/glupart_script" ++#define progPath "%%%NOW_ROOT%%%/bin/glupart_script" int main(int argc, char **argv) { diff --git a/parallel/glunix/patches/patch-cf b/parallel/glunix/patches/patch-cf new file mode 100644 index 00000000000..a770597f35c --- /dev/null +++ b/parallel/glunix/patches/patch-cf @@ -0,0 +1,13 @@ +$NetBSD: patch-cf,v 1.1 2000/06/16 23:40:18 wiz Exp $ + +--- glunix/src/perf/cperf_collector.h.orig Fri Sep 5 21:30:06 1997 ++++ glunix/src/perf/cperf_collector.h Sat Jun 17 01:13:40 2000 +@@ -87,7 +87,7 @@ + int numExpected); + ~Perf_Collector(void); + +- CollectTicket(timeval *endTime); ++ int CollectTicket(timeval *endTime); + + private: + Bool enabled; |