Changeset 38762 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Sep 15, 2011 12:41:51 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c
r38759 r38762 61 61 #endif 62 62 63 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) 64 # define USE_WORKQUEUE 65 #endif 66 67 #ifdef USE_WORKQUEUE 63 68 /* The definition of work queue functions changed in Linux 2.6.20. */ 64 # if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)69 # if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20) 65 70 typedef struct work_struct *WQ_PARAM; 66 # else71 # else 67 72 typedef void *WQ_PARAM; 73 # endif 74 #else 75 typedef unsigned long WQ_PARAM; 68 76 #endif 69 77 … … 106 114 /** Wait queue used by polling. */ 107 115 static wait_queue_head_t g_PollEventQueue; 116 #ifdef USE_WORKQUEUE 108 117 /** The IRQ bottom half work queue for reporting the mouse position */ 109 118 static struct work_struct g_MouseEventWQ; 119 #else 120 DECLARE_TASKLET_DISABLED(g_MouseTasklet, vboxguestReportMousePosition, 0); 121 #endif 110 122 /** Asynchronous notification stuff. */ 111 123 static struct fasync_struct *g_pFAsyncQueue; … … 363 375 364 376 init_waitqueue_head(&g_PollEventQueue); 377 #ifdef USE_WORKQUEUE 365 378 INIT_WORK(&g_MouseEventWQ, vboxguestReportMousePosition 366 # if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)379 # if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20) 367 380 , NULL 368 # endif381 # endif 369 382 ); 383 #else 384 tasklet_enable(&g_MouseTasklet); 385 tasklet_schedule(&g_MouseTasklet); 386 #endif 370 387 rc = request_irq(g_pPciDev->irq, 371 388 vboxguestLinuxISR, … … 985 1002 kill_fasync(&g_pFAsyncQueue, SIGIO, POLL_IN); 986 1003 Log(("VBoxGuestNativeISRMousePollEvent: done\n")); 1004 #ifdef USE_WORKQUEUE 987 1005 schedule_work(&g_MouseEventWQ); 1006 #else 1007 tasklet_schedule(&g_MouseTasklet); 1008 #endif 988 1009 } 989 1010 … … 1101 1122 MODULE_VERSION(VBOX_VERSION_STRING); 1102 1123 #endif 1103
Note:
See TracChangeset
for help on using the changeset viewer.