initterm-r0drv-linux.c revision 1d78e6358c47c7fe42af63c999c6308b11325a1a
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * IPRT - Initialization & Termination, R0 Driver, Linux.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * Copyright (C) 2006-2011 Oracle Corporation
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * available from http://www.virtualbox.org. This file is free software;
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * you can redistribute it and/or modify it under the terms of the GNU
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * General Public License (GPL) as published by the Free Software
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * The contents of this file may alternatively be used under the terms
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * of the Common Development and Distribution License Version 1.0
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * VirtualBox OSE distribution, in which case the provisions of the
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * CDDL are applicable instead of those of the GPL.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * You may elect to license modified versions of this file under the
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * terms and conditions of either the GPL or the CDDL or both.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync/*******************************************************************************
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync* Header Files *
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync*******************************************************************************/
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync/*******************************************************************************
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync* Global Variables *
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync*******************************************************************************/
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync/** The IPRT work queue. */
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncstatic struct workqueue_struct *g_prtR0LnxWorkQueue;
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync/*******************************************************************************
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync* Internal Functions *
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync*******************************************************************************/
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * Pushes an item onto the IPRT work queue.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * @param pWork The work item.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * @param pfnWorker The callback function. It will be called back
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * with @a pWork as argument.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsyncDECLHIDDEN(void) rtR0LnxWorkqueuePush(RTR0LNXWORKQUEUEITEM *pWork, void (*pfnWorker)(RTR0LNXWORKQUEUEITEM *))
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync INIT_TQUEUE(pWork, (void (*)(void *))pfnWorker, pWork);
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * Flushes all items in the IPRT work queue.
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * @remarks This is mostly for 2.4.x compatability. Must not be called from
14ea49401f3c8c61422aefbda43809e275f60c6cvboxsync * atomic contexts or with unncessary locks held.