• Zebediah Figura's avatar
    winedevice: Make driver (un)loading synchronous. · 44e79432
    Zebediah Figura authored
    This essentially reverts 440482d2.
    
    440482d2 was aimed towards making it possible to load multiple drivers
    asynchronously, as well as to allow reentrancy. Unfortunately, asynchronicity
    is incorrect, as demonstrated by bug 38836, and some trivial testing shows
    that the SCM database lock is held for the entirety of the driver entry and
    exit routines, and that StartService() and ControlService() block until they
    complete. 57268241 and dd2624a2 nullified the effects of 440482d2, making driver
    loading all but synchronous (with the exception of the added 30 second
    timeout, but this is actually incorrect: drivers can block indefinitely).
    
    This patch therefore does not change any behaviour, but rather removes the
    use of threadpools and "async" functions, essentially reverting back to the
    implementation prior to 440482d2. The incidental change to unload_driver()
    made by that patch (viz. never to unload a driver without a DriverUnload()
    routine) is kept.
    Signed-off-by: 's avatarZebediah Figura <z.figura12@gmail.com>
    Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
    44e79432
device.c 16 KB