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