summaryrefslogtreecommitdiff
path: root/emulators/hercules/patches/patch-ai
blob: 465b44512cb728e5e665bc65050b13a1ed988644 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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))