head 1.2; access; symbols netbsd-7-2-RELEASE:1.1.1.3 netbsd-7-1-2-RELEASE:1.1.1.3 netbsd-7-1-1-RELEASE:1.1.1.3 netbsd-7-1:1.1.1.3.0.14 netbsd-7-1-RELEASE:1.1.1.3 netbsd-7-1-RC2:1.1.1.3 netbsd-7-1-RC1:1.1.1.3 netbsd-7-0-2-RELEASE:1.1.1.3 netbsd-7-0-1-RELEASE:1.1.1.3 netbsd-7-0:1.1.1.3.0.12 netbsd-7-0-RELEASE:1.1.1.3 netbsd-7-0-RC3:1.1.1.3 netbsd-7-0-RC2:1.1.1.3 netbsd-7-0-RC1:1.1.1.3 netbsd-5-2-3-RELEASE:1.1.1.1 netbsd-5-1-5-RELEASE:1.1.1.1 netbsd-6-0-6-RELEASE:1.1.1.3 netbsd-6-1-5-RELEASE:1.1.1.3 netbsd-7:1.1.1.3.0.10 netbsd-7-base:1.1.1.3 netbsd-6-1-4-RELEASE:1.1.1.3 netbsd-6-0-5-RELEASE:1.1.1.3 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1.1.3 riastradh-drm2:1.1.1.3.0.8 riastradh-drm2-base:1.1.1.3 netbsd-6-1-3-RELEASE:1.1.1.3 netbsd-6-0-4-RELEASE:1.1.1.3 netbsd-5-2-2-RELEASE:1.1.1.1 netbsd-5-1-4-RELEASE:1.1.1.1 netbsd-6-1-2-RELEASE:1.1.1.3 netbsd-6-0-3-RELEASE:1.1.1.3 netbsd-5-2-1-RELEASE:1.1.1.1 netbsd-5-1-3-RELEASE:1.1.1.1 netbsd-6-1-1-RELEASE:1.1.1.3 xorg-server-1-10-6:1.1.1.3 netbsd-6-1:1.1.1.3.0.6 netbsd-6-0-2-RELEASE:1.1.1.3 netbsd-6-1-RELEASE:1.1.1.3 netbsd-6-1-RC4:1.1.1.3 netbsd-6-1-RC3:1.1.1.3 netbsd-6-1-RC2:1.1.1.3 netbsd-6-1-RC1:1.1.1.3 netbsd-5-2:1.1.1.1.0.8 netbsd-6-0-1-RELEASE:1.1.1.3 netbsd-5-2-RELEASE:1.1.1.1 netbsd-5-2-RC1:1.1.1.1 netbsd-6-0:1.1.1.3.0.4 netbsd-6-0-RELEASE:1.1.1.3 netbsd-6-0-RC2:1.1.1.3 netbsd-6-0-RC1:1.1.1.3 netbsd-6:1.1.1.3.0.2 netbsd-6-base:1.1.1.3 netbsd-5-1-2-RELEASE:1.1.1.1 netbsd-5-1-1-RELEASE:1.1.1.1 xorg-server-1-10-3:1.1.1.3 mrg-xorg-server-1-9-5-pre-1-10-3:1.1.1.2 xorg-server-1-9-5:1.1.1.2 xorg-server-1-9-2:1.1.1.2 netbsd-5-1:1.1.1.1.0.6 netbsd-5-1-RELEASE:1.1.1.1 netbsd-5-1-RC4:1.1.1.1 netbsd-5-1-RC3:1.1.1.1 netbsd-5-1-RC2:1.1.1.1 netbsd-5-1-RC1:1.1.1.1 netbsd-5-0-2-RELEASE:1.1.1.1 xorg-server-1-6-5:1.1.1.1 xorg-server-1-6-3:1.1.1.1 netbsd-5-0-1-RELEASE:1.1.1.1 xorg-server-1-6-2:1.1.1.1 xorg-server-1-6-1-901:1.1.1.1 netbsd-5-0:1.1.1.1.0.4 netbsd-5-0-RELEASE:1.1.1.1 netbsd-5-0-RC4:1.1.1.1 netbsd-5-0-RC3:1.1.1.1 netbsd-5-0-RC2:1.1.1.1 netbsd-5-0-RC1:1.1.1.1 netbsd-5:1.1.1.1.0.2 netbsd-5-base:1.1.1.1 xorg-server-1-4-2:1.1.1.1 xorg:1.1.1; locks; strict; comment @# @; 1.2 date 2016.08.11.00.04.28; author mrg; state dead; branches; next 1.1; commitid FQxwnZNPy5ZgOOhz; 1.1 date 2008.07.31.19.50.31; author mrg; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2008.07.31.19.50.31; author mrg; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 2010.11.23.05.21.21; author mrg; state Exp; branches; next 1.1.1.3; 1.1.1.3 date 2011.08.02.06.56.51; author mrg; state Exp; branches; next ; desc @@ 1.2 log @first merge of netbsd changes. not tested yet. @ text @
#include "inputstr.h"#include "dmxinputinit.h"#include "dmxsigio.h"#include "dmxevents.h"#include <signal.h>#include <unistd.h>#include <sys/fcntl.h>Functions | |
| void | dmxSigioBlock (void) |
| void | dmxSigioUnblock (void) |
| void | dmxSigioEnableInput (void) |
| void | dmxSigioDisableInput (void) |
| void | dmxSigioRegister (DMXInputInfo *dmxInput, int fd) |
| void | dmxSigioUnregister (DMXInputInfo *dmxInput) |
|
|
Block SIGIO handling. |
|
|
Disable SIGIO handling. This removes the hanlder from the OS. |
|
|
Enable SIGIO handling. This instantiates the handler with the OS. |
|
||||||||||||
|
Make a note that the input device described in dmxInput will be using the file descriptor fd for SIGIO signals. Calls AddEnabledDevice ifi SIGIO handling has been enabled with dmxSigioEnableInput(). |
|
|
Unblock SIGIO handling. |
|
|
Remove the notes that dmxInput is using any file descriptors for SIGIO signals. Calls RemoveEnabledDevice. |
#include "inputstr.h"#include "dmxinputinit.h"#include "dmxsigio.h"#include "dmxevents.h"#include <signal.h>#include <unistd.h>#include <fcntl.h>Defines | |
| #define | O_ASYNC 0 |
| #define | O_NONBLOCK FNONBLK |
Functions | |
| static void | dmxSigioHandler (int sig) |
| void | dmxSigioBlock (void) |
| void | dmxSigioUnblock (void) |
| static void | dmxSigioHook (void) |
| static void | dmxSigioUnhook (void) |
| static void | dmxSigioAdd (DMXInputInfo *dmxInput) |
| static void | dmxSigioRemove (DMXInputInfo *dmxInput) |
| void | dmxSigioEnableInput (void) |
| void | dmxSigioDisableInput (void) |
| void | dmxSigioRegister (DMXInputInfo *dmxInput, int fd) |
| void | dmxSigioUnregister (DMXInputInfo *dmxInput) |
Variables | |
| static int | dmxFdCount = 0 |
| static Bool | dmxInputEnabled = TRUE |
Provides an interface for handling SIGIO signals for input devices.
| #define O_ASYNC 0 |
Referenced by dmxSigioAdd(), and dmxSigioRemove().
d29 1 a29 12| #define O_NONBLOCK FNONBLK |
Referenced by kbdLinuxOpenVT(), msLinuxInit(), ps2LinuxInit(), and usbInit().
d33 15 a47 14| static void dmxSigioAdd | ( | DMXInputInfo * | dmxInput | ) | [static] |
a48 7
References DMX_ACTIVESIGIO, DMX_NOSIGIO, DMX_USESIGIO, dmxFdCount, dmxSigioHook(), O_ASYNC, _DMXInputInfo::sigioAdded, _DMXInputInfo::sigioFd, _DMXInputInfo::sigioFdCount, and _DMXInputInfo::sigioState.
Referenced by dmxSigioEnableInput(), and dmxSigioRegister().
a49 14| void dmxSigioBlock | ( | void | ) |
| void dmxSigioDisableInput | ( | void | ) | d78 1 d80 26 a105 21 |
| void dmxSigioEnableInput | ( | void | ) | a106 26 |
Enable SIGIO handling. This instantiates the handler with the OS.
References dmxInputEnabled, dmxInputs, dmxNumInputs, and dmxSigioAdd().
Referenced by dmxSwitchReturn().
| static void dmxSigioHandler | ( | int | sig | ) | [static] |
| static void dmxSigioHook | ( | void | ) | [static] |
| void dmxSigioRegister | ( | DMXInputInfo * | dmxInput, | a134 1d136 3 a138 2 | int | fd | d142 2 a143 2 | ) | a144 26 |
Make a note that the input device described in dmxInput will be using the file descriptor fd for SIGIO signals. Calls AddEnabledDevice ifi SIGIO handling has been enabled with dmxSigioEnableInput().
References DMX_MAX_SIGIO_FDS, dmxFatal, dmxInputEnabled, dmxLog(), dmxSigioAdd(), _DMXInputInfo::sigioFd, _DMXInputInfo::sigioFdCount, and _DMXInputInfo::sigioState.
Referenced by dmxDeviceOnOff().
| static void dmxSigioRemove | ( | DMXInputInfo * | dmxInput | ) | [static] |
References DMX_ACTIVESIGIO, DMX_NOSIGIO, DMX_USESIGIO, dmxFdCount, dmxSigioUnhook(), O_ASYNC, _DMXInputInfo::sigioAdded, _DMXInputInfo::sigioFd, _DMXInputInfo::sigioFdCount, and _DMXInputInfo::sigioState.
Referenced by dmxSigioDisableInput(), and dmxSigioUnregister().
| void dmxSigioUnblock | ( | void | ) |
| static void dmxSigioUnhook | ( | void | ) | [static] |
a173 5
Referenced by dmxSigioRemove().
a174 14| void dmxSigioUnregister | ( | DMXInputInfo * | dmxInput | ) |
int dmxFdCount = 0 [static] |
a202 5
Referenced by dmxSigioAdd(), and dmxSigioRemove().
a203 9Bool dmxInputEnabled = TRUE [static] |