summaryrefslogtreecommitdiff
path: root/emulators/hercules
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>2001-02-26 14:49:34 +0000
committeragc <agc@pkgsrc.org>2001-02-26 14:49:34 +0000
commit41e994c9c8915ddab7fb36d1a0d2365c3509523f (patch)
tree82227cc0648a026a25508d96d91b504f9e4f3356 /emulators/hercules
parent12a0b47217cb1291e3dbabd2255f1d69e90a6c7f (diff)
downloadpkgsrc-41e994c9c8915ddab7fb36d1a0d2365c3509523f.tar.gz
Add a patch to stop the Hercules emulator dumping core when exitting, from
Wolfgang Solfrank (ws@tools.de)
Diffstat (limited to 'emulators/hercules')
-rw-r--r--emulators/hercules/files/patch-sum5
-rw-r--r--emulators/hercules/patches/patch-ag35
-rw-r--r--emulators/hercules/patches/patch-ah14
-rw-r--r--emulators/hercules/patches/patch-ai20
4 files changed, 73 insertions, 1 deletions
diff --git a/emulators/hercules/files/patch-sum b/emulators/hercules/files/patch-sum
index b5387fe580c..a7c16344987 100644
--- a/emulators/hercules/files/patch-sum
+++ b/emulators/hercules/files/patch-sum
@@ -1,4 +1,4 @@
-$NetBSD: patch-sum,v 1.4 2001/02/22 11:34:58 agc Exp $
+$NetBSD: patch-sum,v 1.5 2001/02/26 14:49:34 agc Exp $
MD5 (patch-aa) = 9ff34670eaeb36afe5749377526a7511
MD5 (patch-ab) = 988467f26ca940d05be7d0255e88777c
@@ -6,3 +6,6 @@ MD5 (patch-ac) = 421c7f3a40af82630c6bd3bdebd3c23c
MD5 (patch-ad) = 89b5ae924983465348273dd59ee38435
MD5 (patch-ae) = 34a1f9c2e71ef45de7728e9babbd0a57
MD5 (patch-af) = 75f1f52f32ce95806d56912f19a12ec8
+MD5 (patch-ag) = 881d311d297ee78ed783d646adb8dee9
+MD5 (patch-ah) = 3a84678bcd428af12946aa5ad3f607e2
+MD5 (patch-ai) = dc26bd4e8beda38f368f706b351b86c7
diff --git a/emulators/hercules/patches/patch-ag b/emulators/hercules/patches/patch-ag
new file mode 100644
index 00000000000..52562cb2625
--- /dev/null
+++ b/emulators/hercules/patches/patch-ag
@@ -0,0 +1,35 @@
+$NetBSD: patch-ag,v 1.1 2001/02/26 14:49:35 agc Exp $
+
+Fix for coredump on exit on NetBSD from Wolfgang Solfrank
+
+--- cpu.c 2001/02/26 14:35:56 1.1
++++ cpu.c 2001/02/26 14:40:26
+@@ -741,19 +741,22 @@
+
+ void *cpu_thread (REGS *regs)
+ {
+-#define CPU_PRIORITY 15 /* CPU thread priority */
+
+ #ifndef WIN32
+- /* Set CPU thread priority */
+- if (setpriority(PRIO_PROCESS, 0, CPU_PRIORITY))
+- logmsg ("HHC621I CPU thread set priority failed: %s\n",
+- strerror(errno));
++ struct sched_param sp;
++ int p;
++
++ if (pthread_getschedparam(pthread_self(), &p, &sp)
++ || (sp.sched_priority = sched_get_priority_min(p),
++ pthread_setschedparam(pthread_self(), p, &sp)))
++ logmsg ("HHC621I CPU thread set priority failed: %s\n",
++ strerror(errno));
+
+ /* Display thread started message on control panel */
+ logmsg ("HHC620I CPU%4.4X thread started: tid=%8.8lX, pid=%d, "
+ "priority=%d\n",
+ regs->cpuad, thread_id(), getpid(),
+- getpriority(PRIO_PROCESS,0));
++ sp.sched_priority);
+ #endif
+
+ logmsg ("HHC630I CPU%4.4X Architecture Mode %s\n",regs->cpuad,
diff --git a/emulators/hercules/patches/patch-ah b/emulators/hercules/patches/patch-ah
new file mode 100644
index 00000000000..e8b2d65a1c2
--- /dev/null
+++ b/emulators/hercules/patches/patch-ah
@@ -0,0 +1,14 @@
+$NetBSD: patch-ah,v 1.1 2001/02/26 14:49:35 agc Exp $
+
+Fix for coredump on exit on NetBSD from Wolfgang Solfrank
+
+--- hercules.h 2001/02/26 14:36:15 1.1
++++ hercules.h 2001/02/26 14:40:28
+@@ -110,6 +110,7 @@
+ #define HAVE_STRUCT_TIMESPEC
+ #endif
+ #include <pthread.h>
++#include <sched.h>
+ #ifdef WIN32
+ #undef DWORD
+ #endif
diff --git a/emulators/hercules/patches/patch-ai b/emulators/hercules/patches/patch-ai
new file mode 100644
index 00000000000..465b44512cb
--- /dev/null
+++ b/emulators/hercules/patches/patch-ai
@@ -0,0 +1,20 @@
+$NetBSD: patch-ai,v 1.1 2001/02/26 14:49:35 agc Exp $
+
+Fix for coredump on exit on NetBSD from Wolfgang Solfrank
+
+--- panel.c 2001/02/26 14:36:27 1.1
++++ panel.c 2001/02/26 14:40:30
+@@ -1798,6 +1798,13 @@
+ /* quit or exit command - terminate the emulator */
+ if (strcmp(cmd,"quit") == 0 || strcmp(cmd,"exit") == 0)
+ {
++ struct sched_param sp;
++ int p;
++
++ pthread_getschedparam(pthread_self(), &p, &sp);
++ sp.sched_priority = sched_get_priority_max(p);
++ pthread_setschedparam(pthread_self(), p, &sp);
++
+ sysblk.msgpipew = stderr;
+ devascii = strtok(cmd+4," \t");
+ if (devascii == NULL || strcmp("now",devascii))