1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-11 23:43:19 +00:00
Interlisp.maiko/bin/makefile-sunos5.i386-x
Nick Briggs 377a6f3f47
Rewrite keyboard and async I/O handling to improve performance and reduce dependency on async I/O signals (#392)
* Rewrite keyboard and async I/O handling to improve performance and reduce dependency on async I/O signals

Replaces the SIGIO handler, which used to process X events in the interrupt context, with
a stub routine that sets a flag to signal processing is required.
Actual event processing is moved to the main dispatch loop where Lisp periodic interrupts
are handled.

Removes the X connection file descriptor from the set of fds contributing to SIGIO events
and moves the processing of X events to where the Lisp periodic interrupt is handled in
the main dispatch loop.  This code is already guarded by a check for XPending() so can
be called regardless of whether any file descriptors are known to be ready.

Actual processing of async I/O events and X events are handled by procedures
process_io_events() and process_Xevents() respectively.  For the most part these are
a renaming of getsignaldata() and getXsignaldata().

The Lisp periodic timer (VTALRM) was set to operate with a 25000 us period (40 Hz),
but on modern hardware it is possible to run this timer with a period of 10000 us (100 Hz)

Incidentally, a bug was noted (and fixed) in the X event handling code for motion events:
Mouse motion without any keyboard activity should not add an entry to the keyboard event
ring buffer as these events do not represent a key state change.
Since the ring buffer is of limited size, when it is filled new events are ignored
until the buffered events are processed.  This resulted in the loss of a key/mouse button
transition (up or down) if the mouse was moved about "too much" between keyboard events.

A few incidental cleanups were also made:
  - KBDEventFlg initialization fixed (wrong semantic type)
  - Event_Req renamed to IO_Signalled (more appropriate name)
  - int_io_open() sets up process (self) to handle SIGIO generated by O_ASYNC operations
  - LOCK_X_EVENTS turned off since X library calls can no longer happen in an interrupt context

* Use of O_ASYNC must depend on the symbol being defined (looking at you, Cygwin)

* Add SA_RESTART flag to sigaction for SIGVTALRM periodic interrupt

* LOCK_X_UPDATE is no longer needed and should not be defined by default for Solaris in version.h
2021-09-02 12:42:51 -07:00

51 lines
1.3 KiB
Plaintext

# Options for SOlaris 2.x, INTEL x86 and X-Window
#************************************************************************/
#* */
#* (C) Copyright 1989, 1990, 1990, 1991, 1992, 1993, 1994, 1996 Venue. */
#* All Rights Reserved. */
#* Manufactured in the United States of America. */
#* */
#************************************************************************/
CC = gcc
XFILES = $(OBJECTDIR)xmkicon.o \
$(OBJECTDIR)xbbt.o \
$(OBJECTDIR)dspif.o \
$(OBJECTDIR)xinit.o \
$(OBJECTDIR)xscroll.o \
$(OBJECTDIR)xcursor.o \
$(OBJECTDIR)xlspwin.o \
$(OBJECTDIR)xrdopt.o \
$(OBJECTDIR)xwinman.o
XFLAGS = -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
# Set any debugging options in DEBUGFLAGS. E.g., to enable stack
# checking, use -DSTACKCHECK; to enable the fn-call-time stack
# check, use -DFNSTKCHECK.
DEBUGFLAGS = # -DSTACKCHECK -DFNSTKCHECK
DFLAGS = $(XFLAGS) \
$(DEBUGFLAGS) \
-DOS5 -DUSE_DLPI \
-I$(OPENWINHOME)/include \
-DRELEASE=210
LDFLAGS = -R$(OPENWINHOME)/lib -L$(OPENWINHOME)/lib -lX11 -lc -lm -lsocket -lnsl
LDELDFLAGS = -R$(OPENWINHOME)/lib -L$(OPENWINHOME)/lib -lX11 -lc -lm -lsocket -lnsl
LDEETHERLDFLAGS = -lc -lm -lsocket -lnsl
DLPIFILES = $(OBJECTDIR)dlpi.o
OBJECTDIR = ../$(RELEASENAME)/
default: ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldeether ../$(OSARCHNAME)/ldex