diff options
author | Tiago Vignatti <tiago.vignatti@nokia.com> | 2010-07-11 23:50:03 +0300 |
---|---|---|
committer | Tiago Vignatti <tiago.vignatti@nokia.com> | 2010-07-11 23:58:24 +0300 |
commit | 8e874f5ec36a7db9f0d92df7fe798f0b1c493b13 (patch) | |
tree | d4e545a9b2c20093ffcd7a92b923211005b289c4 | |
parent | 47eecd9550264894401619c5e347442ef3c1512b (diff) |
xfree86: inputthread: (FIXME)
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
-rw-r--r-- | hw/xfree86/common/xf86Events.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index 2e82848ce..46ca4de32 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -284,6 +284,19 @@ xf86Wakeup(pointer blockData, int err, pointer pReadmask) if (xf86VTSwitchPending()) xf86VTSwitch(); } +#ifdef INPUT_THREAD +/* + * xf86ThreadReadInput -- + * signal handler for the input thread. + */ +static void +xf86ThreadReadInput(void *closure) +{ + InputInfoPtr pInfo = (InputInfoPtr) closure; + + pInfo->read_input(pInfo); +} +#else /* * xf86SigioReadInput -- @@ -299,6 +312,7 @@ xf86SigioReadInput(int fd, void *closure) errno = errno_save; } +#endif /* * xf86AddEnabledDevice -- @@ -307,9 +321,14 @@ xf86SigioReadInput(int fd, void *closure) void xf86AddEnabledDevice(InputInfoPtr pInfo) { +#ifdef INPUT_THREAD + AddEnabledDeviceThreaded (pInfo->fd, xf86ThreadReadInput, pInfo); +#else + if (!xf86InstallSIGIOHandler (pInfo->fd, xf86SigioReadInput, pInfo)) { AddEnabledDevice(pInfo->fd); } +#endif } /* @@ -319,6 +338,8 @@ xf86AddEnabledDevice(InputInfoPtr pInfo) void xf86RemoveEnabledDevice(InputInfoPtr pInfo) { + /* TODO: some routine related with the input thread might be needed */ + if (!xf86RemoveSIGIOHandler (pInfo->fd)) { RemoveEnabledDevice(pInfo->fd); } |