69 Commits

Author SHA1 Message Date
Fish (David B. Trout) 3b248beddd Fix occasional random deadlock when GC/DH run simultaneously:
Closes GitHub Issue #788. Also likely closes #789 as well.
2025-12-01 09:39:43 -08:00
Fish (David B. Trout) c7d65ea5e0 Fix Dasd Hardener "wait 0 seconds" loop bug + minor tweaks 2025-03-10 11:25:04 -07:00
Ross Patterson 0a76173eaa Fix #701 (long delays to harden CCKD DASD) (#716)
* Fix #701

* Fixups from @Fish-Git code review.
2025-02-07 22:32:47 -08:00
Fish (David B. Trout) d094e4f3c6 Carry over into SDL Hyperion some recent Aethra fixes:
. Fix compiler warnings on macOS.
. Fix compiler warnings on GCC 12.

. Use performance cores on Apple Silicon. (Enrico Sorichetti)

. Save maxprio/minprio in sysblk so impl() doesn't clobber them. (Tyler Mitchell)
. Handle non-GNU Linuxes properly. (Tyler Mitchell)
. getprotobyname: some Linuxes want "tcp" not "TCP". (Tyler Mitchell)
. Fix for occasional crash on exit. (Tyler Mitchell):

  In POSIX, detach_thread() is neither needed nor valid
  after a return from join_thread(). When the latter returns,
  the thread has exited and its resources are released,
  so detach_thread() not only is not needed, but references
  deallocated resources. This can be harmless, but not always.
2024-01-24 13:17:39 -08:00
Fish (David B. Trout) 6952a34967 Copyright 2021 [skip travis] 2021-03-02 23:17:24 -08:00
Fish (David B. Trout) 2806ddee57 Make OPTION_TXF_PPA_SUPPORT permanent 2021-02-06 20:03:00 -08:00
Fish (David B. Trout) 39b5b0ad9c Fix herclin shutdown hang waiting for keyboard input 2021-01-26 16:26:57 -08:00
Fish (David B. Trout) 9df983e033 OPTION_TXF_PPA_SUPPORT:
Provides PPA (Perform Processor Assist) support for TXF by:

  1. Conditionally suppressing interrupts during transaction retry
  2. Conditionally decreasing frequency of timer interrupts during transaction retry (by automatically increasing the active "timerint" value) during periods of high transactional load (as controlled by the new timer.c "rubato_thread").

based on the amount of assistance requested by the PPA instruction's transactional-abort-assist operand-1 value.
2021-01-25 17:06:23 -08:00
Fish (David B. Trout) 373647e289 Cosmetic removal of superfluous location argument
[skip travis]
2020-05-17 22:06:39 -07:00
Rhialto 50f8510869 Various NetBSD/FreeBSD portability issues (#279):
https://github.com/SDL-Hercules-390/hyperion/issues/279#issuecomment-583849528

[skip travis]
2020-05-17 22:06:35 -07:00
Fish (David B. Trout) 513e6f7331 Restore watchdog support:
The old watchdog thread detected hung CPUs and sent a sigabend signal that was caught and threw a machine check for the malfunctioning CPU in order to try and allow the guest to continue running. This was removed months ago (April 2019) by commit b76163a664.

The new watchdog thread not only detects and reports hung CPUs as before, but now also FIRST detects and reports deadlocked threads too, and does NOT attempt to allow the guest to continue (does NOT cause a Machine Check). Instead, it creates a crash dump for offline post mortem analysis.

[skip travis]
2020-05-17 22:06:34 -07:00
Fish (David B. Trout) 8716c24ac5 hthreads set/get thread name and lock name support
[skip travis]
2020-05-17 22:06:34 -07:00
Fish (David B. Trout) efe1d01d20 HUGE REVERT in preparation for "TXF" series of commits
[skip travis]

Revert "3390 DASD CCW Command SNID (x'34') Correction for RESERVE/RELEASE"

This reverts commit 9fd1dfff4d.

Revert "(Oops!) I did accidentally change functionality! Sorry!"

This reverts commit cb24398570.

Revert "Clean up overall ARCH_DEP structure of hscmisc.c module:"

This reverts commit f99cae0938.

Revert "Suppress HHC00814I and HHC00809I for OSTAILOR VM"

This reverts commit 97ef4d5bce.

Revert "Fix comments to match current state of controversy"

This reverts commit 7aa3c4413a.

Revert "Revert "Fix minor bug in CDFTR/CXFTR instructions""

This reverts commit e4e60f37dc.

Revert "Fix minor bug in CDFTR/CXFTR instructions"

This reverts commit 0f382a7875.

Revert "Eliminate compiler warning."

This reverts commit a5ad6b0a22.

Revert "Add missing */ to facility 20 comment."

This reverts commit adfd31d280.

Revert "Update What's New [skip travis]"

This reverts commit 5b5cdf0249.

Revert "Fix z/VM guest arch switch bug identified in issue #295"

This reverts commit f5504fe407.

Revert "Update documentation. [skip travis]"

This reverts commit 8caa8b15d6.

Revert "Fix for IPL command without a LOADPARM (#296)"

This reverts commit 328e99a685.

Revert "(fix typo) [skip travis]"

This reverts commit 6665c1017a.

Revert "Update What's New and Release Notes web pages"

This reverts commit 21380cd537.

Revert "Cosmetic: remove change indicator comments"

This reverts commit 3ff73f53cb.

Revert "Cosmetic: DIAG = RS_a format."

This reverts commit 67bc1d46be.

Revert "Stop panel select watching logger pipe:"

This reverts commit bef8eb0012.

Revert "(missed one!) [skip travis]"

This reverts commit 017e4374b6.

Revert "Minor cosmetic inst format fixes"

This reverts commit c97e01a6e6.

Revert "Instruction decoders cleanup part 8: IBM formats:"

This reverts commit 977de05643.

Revert "CTCE v2 Circumventing VM/SP Problem and Minor Improvements"

This reverts commit 5080ee8059.

Revert "Fix incomplete network device group crash:"

This reverts commit 590623a729.

Revert "Workaround for VS2019 compiler bug:"

This reverts commit 3a94e280e9.

Revert "Documentation: clarify QETH statement "iface" parameter."

This reverts commit 216da217b6.

Revert "Disable DEBUG_FREESPACE build option:"

This reverts commit 68d91c0648.

Revert "Minor cosmetic + cosmetic typo fix"

This reverts commit e1cbea7326.

Revert "I/O interrupt tracing tweak:"

This reverts commit e004d298d6.

Revert "Cosmetic in preparation for next commit"

This reverts commit 456a0c4c95.

Revert "100% cosmetic: [skip travis]"

This reverts commit 5da6a86c89.

Revert "Cosmetic doc update to HERCLOGO readme [skip travis]"

This reverts commit 7efbcefe28.

Revert "Add dummy device to MSVC Windows build"

This reverts commit 91821019f2.

Revert "Cosmetic: reorg into alpha seq [skip travis]"

This reverts commit 382185ed78.

Revert "Chore: finalize dummy device skeleton"

This reverts commit 73a69e3d4c.

Revert "Fix : Updates to dummy device skeleton"

This reverts commit 9f4c91c352.

Revert "(cosmetic) [skip travis]"

This reverts commit 125c455cfb.

Revert "Instruction decoders cleanup part 7: delete unused IPRINT_FUNC"

This reverts commit fb6f3d5d97.

Revert "Instruction decoders cleanup part 7: delete unused decoders"

This reverts commit 9e8b0e1ca9.

Revert "Instruction decoders cleanup part 6: cosmetic:"

This reverts commit df8fd6e69a.

Revert "Fix: type in Makefile.am"

This reverts commit 73b3d56a31.

Revert "Updare Variuous anciliary files"

This reverts commit 49c3065a69.

Revert "Chore : tcpnje rewrite"

This reverts commit 011c66c778.

Revert "Add missing Vector Facility macros"

This reverts commit 515c428cb7.

Revert "Instruction decoders cleanup part 5: cosmetic:"

This reverts commit 94498258d5.

Revert "Instruction decoders cleanup part 4: fix RRD snafu:"

This reverts commit e899a610f0.

Revert "Instruction decoders cleanup parts 2 and 3:"

This reverts commit aa24c44b27.

Revert "Bug in SSF instruction decoder. Closes #287."

This reverts commit 2b6b899232.

Revert "100% cosmetic (comment tweaks only)"

This reverts commit c78a12e512.

Revert "Fix careless typo in RXXx_BC_DECODER (Sorry!)"

This reverts commit 8094e6506f.

Revert "(Oops!) decoders must be re-#included each time!"

This reverts commit 7089de5adc.

Revert "Instruction decoders cleanup part 1:"

This reverts commit c3e431bcf8.

Revert "Fix TCP/NJE clang warnings + Windows support"

This reverts commit a73daadd59.

Revert "Add TCP/NJE readme file"

This reverts commit fc1c87c86b.

Revert "Chore: Add TCP/NJE support - Experimental"

This reverts commit a3355dbcd1.

Revert "Document yet more Hercules related support groups"

This reverts commit bdf46c225e.

Revert "(yet more html doc tweaking)"

This reverts commit 7c29139e10.

Revert "Replace Yahoo URLs with Groups.IO URLs instead."

This reverts commit e0fb59a379.

Revert "Replace Yahoo URLs with Groups.IO URLs instead."

This reverts commit b75b31ed16.

Revert "Copyright 2020: only what's visible to the user"

This reverts commit c2d6f83184.

Revert "CTCE v2 Corrections and Improvements - Documentation Update"

This reverts commit 020e4a1545.

Revert "(update 4.3 progress)"

This reverts commit 1a1d40db4c.

Revert "Fix sockdev "bind lock" initialization bug:"

This reverts commit 99504d3c11.

Revert "Use set_lock_name to assign better device lock names"

This reverts commit 8018f7796a.

Revert "Tighter lock init/destroy validation"

This reverts commit 63797f60c6.

Revert "Track lock creation"

This reverts commit 39782c0b83.

Revert "Cosmetic removal of superfluous location argument"

This reverts commit 0cead3d18a.

Revert "Yet more cosmetic renames"

This reverts commit fbd4aeeb43.

Revert "Cosmetic struct field renames"

This reverts commit aba323706a.

Revert "Fix minor memory leak in destroy_lock"

This reverts commit 7fc2064c97.

Revert "Fix some minor compiler warnings:"

This reverts commit 9f70f79fdc.

Revert "CTCE v2 Corrections and Improvements - Documentation Update"

This reverts commit a575524d9b.

Revert "CTCE Corrections and Improvements"

This reverts commit d2921aa00c.

Revert "CTCE devices need dev->hnd->halt to always be called"

This reverts commit 8ac28edf9d.

Revert "Support for new DEVLIST and CTC DEBUG command options"

This reverts commit 5ce233e0af.

Revert "(yet another typo)"

This reverts commit 66b91d26a1.

Revert "(typo!)"

This reverts commit 4c4b9c0f30.

Revert "Define framework for new facilities."

This reverts commit ad640b125b.

Revert "New README to explain how to add a new Facility to Hercules"

This reverts commit 9bc2adeb1f.

Revert "Still trying to fix travis-ci build failures!"

This reverts commit e36d1a8f3e.

Revert "(cosmetic cleanup):"

This reverts commit 95b91e8032.

Revert "Update *nix autoconf files due to last few commits"

This reverts commit 28d4f4b0b3.

Revert "Various NetBSD/FreeBSD portability issues (#279):"

This reverts commit 56206efcfa.

Revert "Support perl being in a different place:"

This reverts commit 2f51035436.

Revert "Update documentation regarding ongoing development"

This reverts commit 57d0e0d869.

Revert "Fix minor message number typo"

This reverts commit 2e093718be.

Revert "Minor bootstrap crash handler tweak:"

This reverts commit bec283f0b3.

Revert "Restore watchdog support:"

This reverts commit 81957ddfef.

Revert "hthreads set/get thread name and lock name support"

This reverts commit f56bfb8352.

Revert "New '$test deadlock' testing command"

This reverts commit 6690b9207b.

Revert "Restore DIAG FF8 and FFC for testing purposes"

This reverts commit 002e0602dd.

Revert "Set sysblk.ipled flag on restart command too"

This reverts commit 866bda176e.

Revert "(minor html edit)"

This reverts commit caaa3dcbc0.

Revert "Update *nix autoconf files due to last few commits"

This reverts commit 23c7f6cf8d.

Revert "Treat NetBSD same as FreeBSD per github issue #279"

This reverts commit 2ff0c0d97c.

Revert "Fix another portability issues identified in github issue #279"

This reverts commit 51a24502d2.

Revert "Support for NetBSD 3 arguments pthread_setname_np"

This reverts commit edf7171bfb.

Revert "Fix some portability issues identified in github issue #279"

This reverts commit c740f710be.

Revert "Restore erroneously removed printer immediate CCW opcodes tables:"

This reverts commit 9f2c5606ff.

Revert "TRY TO FIX Travis.CI failure"

This reverts commit c67ac2ee50.

Revert "TRY TO FIX Travis.CI failure"

This reverts commit e5b477b34b.
2020-05-17 22:05:33 -07:00
Fish (David B. Trout) 0cead3d18a Cosmetic removal of superfluous location argument
[skip travis]
2020-02-19 01:42:36 -08:00
Rhialto 56206efcfa Various NetBSD/FreeBSD portability issues (#279):
https://github.com/SDL-Hercules-390/hyperion/issues/279#issuecomment-583849528
2020-02-14 16:09:23 -08:00
Fish (David B. Trout) 81957ddfef Restore watchdog support:
The old watchdog thread detected hung CPUs and sent a sigabend signal that was caught and threw a machine check for the malfunctioning CPU in order to try and allow the guest to continue running. This was removed months ago (April 2019) by commit b76163a664.

The new watchdog thread not only detects and reports hung CPUs as before, but now also FIRST detects and reports deadlocked threads too, and does NOT attempt to allow the guest to continue (does NOT cause a Machine Check). Instead, it creates a crash dump for offline post mortem analysis.
2020-02-10 17:14:00 -08:00
Fish (David B. Trout) f56bfb8352 hthreads set/get thread name and lock name support 2020-02-10 16:59:37 -08:00
Fish (David B. Trout) b76163a664 Eliminate Linux SIGABEND handler and all thread signaling:
SIGABEND handler replaced with bootstrap.c crash handler which reports the crash and creates a dump (i.e. core file) if ulimit or /etc/security/limits.conf unlimited. No more "machine check due to host error"!
2019-04-07 00:30:59 -07:00
Fish (David B. Trout) 5e87644fd1 (misc cosmetic changes) 2019-04-06 10:45:33 -07:00
Fish (David B. Trout) ea4aeb604f New have_lock() macro/func, different from test_lock() macro/func 2018-09-15 05:44:55 -07:00
Fish (David B. Trout) 6c3d42e269 Thread name constants 2018-07-24 05:56:40 -07:00
Fish (David B. Trout) 70fb592932 query, save and use min/max thread priorities 2018-07-12 03:17:03 -07:00
Fish (David B. Trout) a190498f71 hthreads priority handling rework:
Resolves #112: "HTHREADS thread-priorities implementation appears BORKED".
2018-07-12 03:17:03 -07:00
Fish (David B. Trout) 3d02efac2b simplify get/set_thread_priority macro use 2018-07-08 12:46:27 -07:00
Fish (David B. Trout) 297d1ba223 Linux thread names support PART 1:
Make changes need to have *hthreads* do the SET_THREAD_NAME when a thread is created, not fthreads.
2018-07-07 07:48:33 -07:00
Fish (David B. Trout) a0b70fd4be Import/Export cleanup (final):
Finish moving misplaced DLL_IMPORT/DLL_EXPORT #defines from source files into impexp.h.
2018-03-08 13:27:40 -08:00
Fish (David B. Trout) 9daf9f4426 Use ISO/C99 standard printf/scanf format specifiers 2015-11-03 14:51:14 -08:00
Fish (David B. Trout) 8ee327eba9 Fix message -Wformat formatting warnings 2015-11-03 10:30:22 -08:00
Fish (David B. Trout) c0e6e31e06 Fix crash at shutdown on non-LLP64 systems:
Microsoft's MSVC compiler uses LLP64, where int, long and long int are always 32-bits, even for 64-bit builds. Most other systems however, use LP64 where int, long and long int 32-bits only for 32-bit builds but are 64-bits for 64-bit builds:

  Type    ILP64   LP64   LLP64
  int      64     32      32
  long     64     64      32

This causes problems when printing thread ids since pthread_t is typedefed as unsigned long int, which on Windows is always 32-bits regardless of whether you're doing a 32- or 64-bit build, but on non-Windows platforms that use e.g. GCC to build with, they're different, thereby sometimes causing a crash when a thread-id is printed using a printf formatting pattern that doesn't match the argument's actual size.

Note: the crash only sometimes occurs when the printf format string contains a %s format specification following somewhere after a TIDPAT format specification.
2015-05-24 12:10:30 -07:00
Fish (David B. Trout) 4bd0db30f6 MSVC fix for commit 0c2e09c4a7 2014-10-27 03:27:09 -07:00
Enrico Sorichetti 0c2e09c4a7 added a left out for previous commit 2014-10-08 13:32:08 +02:00
Fish (David B. Trout) 0316c4f294 More set thread priority tweaking:
1. Move SETMODE calls into hthreads functions.
2. Issue message that identifies source statement that failed.
2014-01-13 02:01:39 -08:00
Fish (David B. Trout) a7c8ce6ce8 correct set priority handling 2014-01-03 13:54:14 -08:00
John P. Hartmann 677ac05291 Fish's patch to fix lots of portability issues. 2013-12-25 09:54:01 +01:00
Fish (David B. Trout) bd6d746efc Add copyright to hthreads.h 2013-12-22 11:50:12 -08:00
Harold Grovesteen d8c9c52cfd Resolve Linux build errors introduced by Windows performance fix involving hthreads.h and hthreads.c 2013-08-26 11:23:35 -05:00
dasdman 2824a46757 Use cached copy of thread handle in getrusage for Windows. 2013-08-24 14:28:29 -07:00
Fish (David B. Trout) c5bb59b960 Fix bug in cardrdr, align code and add comments:
cardrdr: 'rc' s/b init to 0 to prevent unpredictable erroneous triggering of i/o error path.

hetmap, hsock, hthreads: align source code and add comments. (cosmetic only; no functional change)
2013-08-03 16:55:43 -07:00
Fish (David B. Trout) dbff865b99 HTHREADS/PTTRACE rework Part 2(b): Report abandoned locks
Still to be done: Part 3(a): fthreads R/W locks support
                  Part 3(b): Robust Mutexes support
2013-06-15 08:27:31 -07:00
Fish (David B. Trout) d20f3e0f34 Fix incorrect rwlock intialization 2013-06-03 04:35:53 -07:00
Fish (David B. Trout) 9a643b3fb2 Fix gcc errors from HTHREADS/PTTRACE rework commit 2013-06-02 16:55:52 -07:00
Fish (David B. Trout) 0e0481ffb8 HTHREADS / PTTRACE rework: refer to README.PTT for details.
Note: this is the first (i.e. part 2a) of Part 2 of the locking/threading rework effort: hthreads restructuring.  Part 2b will be the hthreads.c code necessary to detect threads exiting while still holding locks (i.e. abandoned locks).
2013-06-02 05:40:22 -07:00
Fish (David B. Trout) 5ab28746f0 OPTION_PTTRACE made permanent; build option removed. 2013-05-31 11:16:35 -07:00
Fish (David B. Trout) 45fe878e94 OPTION_WTHREADS removed. 2013-05-26 19:16:15 -07:00
Fish (David B. Trout) f3b0eca4fe Move pipe signaling macros where they belong 2013-05-26 09:17:32 -07:00
Fish (David B. Trout) 3dcb548ca5 Removed all "FishIO" (OPTION_FISHIO) code:
NOTE: HQA scenarios in hqadefs.h adjusted appropriately. Please update your hqa.h headers a needed.
2013-05-21 10:36:30 -07:00
Fish (David B. Trout) ac0b79450b (cosmetic comments cleanup) 2013-05-17 21:48:40 -07:00
Fish (David B. Trout) 7c527a5fa2 Improved lock handling Part 1: better error reporting.
Maintain lock ownership and report who owns the lock when an obtain_lock fails.

Part 2 will be the maintaining of a locks list and automatic reporting of abandoned locks (threads exiting while holding a lock(s)).

Part 3 will be adding support for Robust Mutexes, including to fthreads.
2013-05-17 07:53:33 -07:00
Fish-Git 59cee637c1 Remove FishHang crap from Hercules
FishHang was useful during development of fthreads but has not been needed for so many years and so has FINALLY been deleted. Sorry it took me so long to do it.
2012-05-20 15:44:19 -07:00
Jan Jaeger 439bdbca92 Remove subversion $Id$ tag
Update copyright statement to 2012
2012-03-24 18:41:51 +11:00