diff options
Diffstat (limited to 'os/inputthread.c')
-rw-r--r-- | os/inputthread.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/os/inputthread.c b/os/inputthread.c index 8e7f2edb9..721e86312 100644 --- a/os/inputthread.c +++ b/os/inputthread.c @@ -90,6 +90,13 @@ static pthread_mutex_t input_mutex; static Bool input_mutex_initialized; #endif +int +in_input_thread(void) +{ + return inputThreadInfo && + pthread_equal(pthread_self(), inputThreadInfo->thread); +} + void input_lock(void) { @@ -529,6 +536,7 @@ void input_force_unlock(void) {} void InputThreadPreInit(void) {} void InputThreadInit(void) {} void InputThreadFini(void) {} +int in_input_thread(void) { return 0; } int InputThreadRegisterDev(int fd, NotifyFdProcPtr readInputProc, |