VirtualBox

Changeset 38762 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Sep 15, 2011 12:41:51 PM (13 years ago)
Author:
vboxsync
Message:

Linux Additions build fix (untested)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c

    r38759 r38762  
    6161#endif
    6262
     63#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
     64# define USE_WORKQUEUE
     65#endif
     66
     67#ifdef USE_WORKQUEUE
    6368/* 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)
    6570typedef struct work_struct *WQ_PARAM;
    66 #else
     71# else
    6772typedef void *WQ_PARAM;
     73# endif
     74#else
     75typedef unsigned long WQ_PARAM;
    6876#endif
    6977
     
    106114/** Wait queue used by polling. */
    107115static wait_queue_head_t        g_PollEventQueue;
     116#ifdef USE_WORKQUEUE
    108117/** The IRQ bottom half work queue for reporting the mouse position */
    109118static struct work_struct       g_MouseEventWQ;
     119#else
     120DECLARE_TASKLET_DISABLED(g_MouseTasklet, vboxguestReportMousePosition, 0);
     121#endif
    110122/** Asynchronous notification stuff.  */
    111123static struct fasync_struct    *g_pFAsyncQueue;
     
    363375
    364376    init_waitqueue_head(&g_PollEventQueue);
     377#ifdef USE_WORKQUEUE
    365378    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)
    367380              , NULL
    368 #endif
     381# endif
    369382              );
     383#else
     384    tasklet_enable(&g_MouseTasklet);
     385    tasklet_schedule(&g_MouseTasklet);
     386#endif
    370387    rc = request_irq(g_pPciDev->irq,
    371388                     vboxguestLinuxISR,
     
    9851002    kill_fasync(&g_pFAsyncQueue, SIGIO, POLL_IN);
    9861003    Log(("VBoxGuestNativeISRMousePollEvent: done\n"));
     1004#ifdef USE_WORKQUEUE
    9871005    schedule_work(&g_MouseEventWQ);
     1006#else
     1007    tasklet_schedule(&g_MouseTasklet);
     1008#endif
    9881009}
    9891010
     
    11011122MODULE_VERSION(VBOX_VERSION_STRING);
    11021123#endif
    1103 
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette