1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-27 04:12:51 +00:00

Lock X updates for all systems and lock around X cleanup at exit (#391)

* Lock X updates for all systems and lock around X cleanup at exit

All systems which could generate I/O interrupts on the X file descriptor need
to have locking enabled, or there is a high probability that the X library
will deadlock. This requirement may be removed in the future with restructuring
of the way that the interrupt driven I/O is handled.

Ensure that the appropriate XLOCK/XUNLOCK is done around the X window
closing code.

* Also lock X updates when building with CMake.
This commit is contained in:
Nick Briggs
2021-08-26 16:29:10 -07:00
committed by GitHub
parent 934a86fbb5
commit e957e331c4
21 changed files with 23 additions and 21 deletions

View File

@@ -108,13 +108,15 @@ void lisp_Xexit(DspInterface dsp)
{
assert(Lisp_Xinitialized);
#if defined(OS5) && defined(I_SETSIG)
#if defined(I_SETSIG)
ioctl(ConnectionNumber(dsp->display_id), I_SETSIG, 0); /* so no interrupts happen during */
#endif
XLOCK;
XDestroySubwindows(dsp->display_id, dsp->LispWindow);
XDestroyWindow(dsp->display_id, dsp->LispWindow);
XCloseDisplay(dsp->display_id);
XUNLOCK(dsp);
Lisp_Xinitialized = false;
} /* end lisp_Xexit */