PDMAsyncCompletionFile.cpp revision d2c6b2e8826a5ef34170fef0c72c3fc7c5c1b46a
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunnington/* $Id$ */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster/** @file
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * PDM Async I/O - Transport data asynchronous in R3 using EMT.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster/*
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Copyright (C) 2006-2011 Oracle Corporation
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * This file is part of VirtualBox Open Source Edition (OSE), as
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * available from http://www.virtualbox.org. This file is free software;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * you can redistribute it and/or modify it under the terms of the GNU
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * General Public License (GPL) as published by the Free Software
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Foundation, in version 2 as it comes in the "COPYING" file of the
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster/*******************************************************************************
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster* Header Files *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster*******************************************************************************/
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#define LOG_GROUP LOG_GROUP_PDM_ASYNC_COMPLETION
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#define RT_STRICT
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#include "PDMInternal.h"
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#include <VBox/vmm/pdm.h>
402cd5da45d9182b81c16a13c3568faf78701827Andrew Forrest#include <VBox/vmm/mm.h>
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunnington#include <VBox/vmm/vm.h>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#include <VBox/err.h>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#include <VBox/log.h>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#include <VBox/dbg.h>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#include <VBox/vmm/uvm.h>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#include <iprt/asm.h>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#include <iprt/assert.h>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#include <iprt/critsect.h>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#include <iprt/env.h>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#include <iprt/file.h>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#include <iprt/mem.h>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#include <iprt/semaphore.h>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#include <iprt/string.h>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#include <iprt/thread.h>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#include <iprt/path.h>
402cd5da45d9182b81c16a13c3568faf78701827Andrew Forrest
402cd5da45d9182b81c16a13c3568faf78701827Andrew Forrest#include "PDMAsyncCompletionFileInternal.h"
bee2440354b4bc8796e1de0b6cbd60e1f68deba0Phill Cunnington
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster/*******************************************************************************
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster* Internal Functions *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster*******************************************************************************/
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#ifdef VBOX_WITH_DEBUGGER
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterstatic DECLCALLBACK(int) pdmacEpFileErrorInject(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR pArgs, unsigned cArgs);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterstatic DECLCALLBACK(int) pdmacEpFileDelayInject(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR pArgs, unsigned cArgs);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#endif
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster/*******************************************************************************
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster* Global Variables *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster*******************************************************************************/
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#ifdef VBOX_WITH_DEBUGGER
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterstatic const DBGCVARDESC g_aInjectErrorArgs[] =
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster{
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster /* cTimesMin, cTimesMax, enmCategory, fFlags, pszName, pszDescription */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster { 1, 1, DBGCVAR_CAT_STRING, 0, "direction", "write/read." },
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster { 1, 1, DBGCVAR_CAT_STRING, 0, "filename", "Filename." },
Error!

 

There was an error!

null

java.lang.NullPointerException