mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-25 11:37:56 +00:00
0410dc5f5d
method as in /bin/sh. We still do technically undefined things in the signal handler, but it is safe in practice to access state that is protected by INTOFF/INTON. In a recent commit, I sprinkled VGLMouseFrozen++/-- operations in places that need INTOFF/INTON. This prevented clobbering of pixels under the mouse, but left mouse signals deferred for too long. It is necessary to call the signal handler when the count goes to 0. Old versions did this in the unfreeze function, but didn't block actual signals, so the signal handler raced itself. The sprinkled operations reduced the races, but when then worked to block a race they left signals deferred for too long. Use INTOFF/INTON to fix complete loss of mouse signals while reading the mouse status. Clobbering of the state was prevented by SIG_IGN'ing mouse signals, but that has a high overhead and broke more than it fixed by losing mouse signals completely. sigprocmask() works to block signals without losing them completely, but its overhead is also too high. libvgl's mouse signal handling is often worse than none. Applications can't block waiting for a mouse or keyboard or other event, but have to busy-wait. The SIG_IGN's lost about half of all mouse events while busy-waiting for mouse events. |
||
---|---|---|
.. | ||
bitmap.c | ||
keyboard.c | ||
main.c | ||
Makefile | ||
Makefile.depend | ||
mouse.c | ||
simple.c | ||
text.c | ||
vgl.3 | ||
vgl.h |