WinComm/drv
Scott Duensing 5dd464eb18 Fix hang on second COM port open: CLI deadlock, MOVEABLE buffers, stale UART
setque (called by USER.EXE after every inicom) was running GlobalAlloc and
GlobalFree with interrupts disabled.  On the second open the global heap
could need compaction or DPMI selector work, deadlocking under CLI.
Restructured to allocate new buffers first, swap pointers under CLI, then
free old buffers after STI.

Ring buffers changed from GMEM_MOVEABLE to GMEM_FIXED so addresses are
inherently stable at interrupt time.  Added rxBufH/txBufH handle fields
to PortStateT, eliminating the fragile GlobalHandle(SELECTOROF()) recovery
in freeBuffers.

trmcom now resets FIFOs and drains all pending UART conditions (LSR, MSR,
RBR, IIR) before unhooking the ISR, leaving hardware clean for reopen.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 20:06:04 -06:00
..
commdrv.c Fix hang on second COM port open: CLI deadlock, MOVEABLE buffers, stale UART 2026-02-28 20:06:04 -06:00
commdrv.def Rename output from COMM.DRV to KPCOMM.DRV to avoid clashing with stock driver 2026-02-24 20:07:45 -06:00
commdrv.h Fix hang on second COM port open: CLI deadlock, MOVEABLE buffers, stale UART 2026-02-28 20:06:04 -06:00
isr.c Rename output from COMM.DRV to KPCOMM.DRV to avoid clashing with stock driver 2026-02-24 20:07:45 -06:00
makefile Rename output from COMM.DRV to KPCOMM.DRV to avoid clashing with stock driver 2026-02-24 20:07:45 -06:00