VirtualBox

source: vbox/trunk/src/VBox/VMM/PDMAsyncCompletionFileInternal.h@ 24350

Last change on this file since 24350 was 24278, checked in by vboxsync, 15 years ago

AsyncCompletion: Cleanup in the cache and more statistics (more to come)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 21.5 KB
Line 
1/* $Id: PDMAsyncCompletionFileInternal.h 24278 2009-11-02 20:26:07Z vboxsync $ */
2/** @file
3 * PDM Async I/O - Transport data asynchronous in R3 using EMT.
4 */
5
6/*
7 * Copyright (C) 2006-2008 Sun Microsystems, Inc.
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18 * Clara, CA 95054 USA or visit http://www.sun.com if you need
19 * additional information or have any questions.
20 */
21
22#ifndef ___PDMAsyncCompletionFileInternal_h
23#define ___PDMAsyncCompletionFileInternal_h
24
25#include <VBox/cfgm.h>
26#include <VBox/stam.h>
27#include <iprt/types.h>
28#include <iprt/file.h>
29#include <iprt/thread.h>
30#include <iprt/semaphore.h>
31#include <iprt/critsect.h>
32#include <iprt/avl.h>
33
34#include "PDMAsyncCompletionInternal.h"
35
36/** @todo: Revise the caching of tasks. We have currently four caches:
37 * Per endpoint task cache
38 * Per class cache
39 * Per endpoint task segment cache
40 * Per class task segment cache
41 *
42 * We could use the RT heap for this probably or extend MMR3Heap (uses RTMemAlloc
43 * instead of managing larger blocks) to have this global for the whole VM.
44 */
45
46RT_C_DECLS_BEGIN
47
48/**
49 * A few forward declerations.
50 */
51typedef struct PDMASYNCCOMPLETIONENDPOINTFILE *PPDMASYNCCOMPLETIONENDPOINTFILE;
52/** Pointer to a request segment. */
53typedef struct PDMACTASKFILE *PPDMACTASKFILE;
54/** Pointer to the endpoint class data. */
55typedef struct PDMASYNCCOMPLETIONTASKFILE *PPDMASYNCCOMPLETIONTASKFILE;
56/** Pointer to a cache LRU list. */
57typedef struct PDMACFILELRULIST *PPDMACFILELRULIST;
58/** Pointer to the global cache structure. */
59typedef struct PDMACFILECACHEGLOBAL *PPDMACFILECACHEGLOBAL;
60
61/**
62 * Blocking event types.
63 */
64typedef enum PDMACEPFILEAIOMGRBLOCKINGEVENT
65{
66 /** Invalid tye */
67 PDMACEPFILEAIOMGRBLOCKINGEVENT_INVALID = 0,
68 /** An endpoint is added to the manager. */
69 PDMACEPFILEAIOMGRBLOCKINGEVENT_ADD_ENDPOINT,
70 /** An endpoint is removed from the manager. */
71 PDMACEPFILEAIOMGRBLOCKINGEVENT_REMOVE_ENDPOINT,
72 /** An endpoint is about to be closed. */
73 PDMACEPFILEAIOMGRBLOCKINGEVENT_CLOSE_ENDPOINT,
74 /** The manager is requested to terminate */
75 PDMACEPFILEAIOMGRBLOCKINGEVENT_SHUTDOWN,
76 /** The manager is requested to suspend */
77 PDMACEPFILEAIOMGRBLOCKINGEVENT_SUSPEND,
78 /** The manager is requested to resume */
79 PDMACEPFILEAIOMGRBLOCKINGEVENT_RESUME,
80 /** 32bit hack */
81 PDMACEPFILEAIOMGRBLOCKINGEVENT_32BIT_HACK = 0x7fffffff
82} PDMACEPFILEAIOMGRBLOCKINGEVENT;
83
84/**
85 * States of the I/O manager.
86 */
87typedef enum PDMACEPFILEMGRSTATE
88{
89 /** Invalid state. */
90 PDMACEPFILEMGRSTATE_INVALID = 0,
91 /** Normal running state accepting new requests
92 * and processing them.
93 */
94 PDMACEPFILEMGRSTATE_RUNNING,
95 /** Fault state - not accepting new tasks for endpoints but waiting for
96 * remaining ones to finish.
97 */
98 PDMACEPFILEMGRSTATE_FAULT,
99 /** Suspending state - not accepting new tasks for endpoints but waiting
100 * for remaining ones to finish.
101 */
102 PDMACEPFILEMGRSTATE_SUSPENDING,
103 /** Shutdown state - not accepting new tasks for endpoints but waiting
104 * for remaining ones to finish.
105 */
106 PDMACEPFILEMGRSTATE_SHUTDOWN,
107 /** 32bit hack */
108 PDMACEPFILEMGRSTATE_32BIT_HACK = 0x7fffffff
109} PDMACEPFILEMGRSTATE;
110
111/**
112 * State of a async I/O manager.
113 */
114typedef struct PDMACEPFILEMGR
115{
116 /** Next Aio manager in the list. */
117 R3PTRTYPE(struct PDMACEPFILEMGR *) pNext;
118 /** Previous Aio manager in the list. */
119 R3PTRTYPE(struct PDMACEPFILEMGR *) pPrev;
120 /** Current state of the manager. */
121 PDMACEPFILEMGRSTATE enmState;
122 /** Event semaphore the manager sleeps on when waiting for new requests. */
123 RTSEMEVENT EventSem;
124 /** Flag whether the thread waits in the event semaphore. */
125 volatile bool fWaitingEventSem;
126 /** Flag whether this manager uses the failsafe method. */
127 bool fFailsafe;
128 /** Thread data */
129 RTTHREAD Thread;
130 /** The async I/O context for this manager. */
131 RTFILEAIOCTX hAioCtx;
132 /** Flag whether the I/O manager was woken up. */
133 volatile bool fWokenUp;
134 /** List of endpoints assigned to this manager. */
135 R3PTRTYPE(PPDMASYNCCOMPLETIONENDPOINTFILE) pEndpointsHead;
136 /** Number of endpoints assigned to the manager. */
137 unsigned cEndpoints;
138 /** Number of requests active currently. */
139 unsigned cRequestsActive;
140 /** Pointer to an array of free async I/O request handles. */
141 RTFILEAIOREQ *pahReqsFree;
142 /** Next free position for a free request handle. */
143 unsigned iFreeEntryNext;
144 /** Position of the next free task handle */
145 unsigned iFreeReqNext;
146 /** Size of the array. */
147 unsigned cReqEntries;
148 /** Critical section protecting the blocking event handling. */
149 RTCRITSECT CritSectBlockingEvent;
150 /** Event sempahore for blocking external events.
151 * The caller waits on it until the async I/O manager
152 * finished processing the event. */
153 RTSEMEVENT EventSemBlock;
154 /** Flag whether a blocking event is pending and needs
155 * processing by the I/O manager. */
156 volatile bool fBlockingEventPending;
157 /** Blocking event type */
158 volatile PDMACEPFILEAIOMGRBLOCKINGEVENT enmBlockingEvent;
159 /** Event type data */
160 union
161 {
162 /** Add endpoint event. */
163 struct
164 {
165 /** The endpoint to be added */
166 volatile PPDMASYNCCOMPLETIONENDPOINTFILE pEndpoint;
167 } AddEndpoint;
168 /** Remove endpoint event. */
169 struct
170 {
171 /** The endpoint to be removed */
172 volatile PPDMASYNCCOMPLETIONENDPOINTFILE pEndpoint;
173 } RemoveEndpoint;
174 /** Close endpoint event. */
175 struct
176 {
177 /** The endpoint to be closed */
178 volatile PPDMASYNCCOMPLETIONENDPOINTFILE pEndpoint;
179 } CloseEndpoint;
180 } BlockingEventData;
181} PDMACEPFILEMGR;
182/** Pointer to a async I/O manager state. */
183typedef PDMACEPFILEMGR *PPDMACEPFILEMGR;
184/** Pointer to a async I/O manager state pointer. */
185typedef PPDMACEPFILEMGR *PPPDMACEPFILEMGR;
186
187/**
188 * Data for one request segment waiting for cache entry.
189 */
190typedef struct PDMACFILETASKSEG
191{
192 /** Next task segment in the list. */
193 struct PDMACFILETASKSEG *pNext;
194 /** Task this segment is for. */
195 PPDMASYNCCOMPLETIONTASKFILE pTask;
196 /** Offset into the cache entry buffer to start reading from. */
197 uint32_t uBufOffset;
198 /** Number of bytes to transfer. */
199 size_t cbTransfer;
200 /** Pointer to the buffer. */
201 void *pvBuf;
202 /** Flag whether this entry writes data to the cache. */
203 bool fWrite;
204} PDMACFILETASKSEG, *PPDMACFILETASKSEG;
205
206/**
207 * A cache entry
208 */
209typedef struct PDMACFILECACHEENTRY
210{
211 /** The AVL entry data. */
212 AVLRFOFFNODECORE Core;
213 /** Pointer to the previous element. Used in one of the LRU lists.*/
214 struct PDMACFILECACHEENTRY *pPrev;
215 /** Pointer to the next element. Used in one of the LRU lists.*/
216 struct PDMACFILECACHEENTRY *pNext;
217 /** Pointer to the list the entry is in. */
218 PPDMACFILELRULIST pList;
219 /** Pointer to the global cache structure. */
220 PPDMACFILECACHEGLOBAL pCache;
221 /** Endpoint the entry belongs to. */
222 PPDMASYNCCOMPLETIONENDPOINTFILE pEndpoint;
223 /** Flags for this entry. Combinations of PDMACFILECACHE_* #defines */
224 uint32_t fFlags;
225 /** Reference counter. Prevents eviction of the entry if > 0. */
226 volatile uint32_t cRefs;
227 /** Size of the entry. */
228 size_t cbData;
229 /** Pointer to the memory containing the data. */
230 uint8_t *pbData;
231 /** Head of list of tasks waiting for this one to finish. */
232 PPDMACFILETASKSEG pWaitingHead;
233 /** Tail of list of tasks waiting for this one to finish. */
234 PPDMACFILETASKSEG pWaitingTail;
235} PDMACFILECACHEENTRY, *PPDMACFILECACHEENTRY;
236/** I/O is still in progress for this entry. This entry is not evictable. */
237#define PDMACFILECACHE_ENTRY_IO_IN_PROGRESS RT_BIT(0)
238/** Entry is locked and thus not evictable. */
239#define PDMACFILECACHE_ENTRY_LOCKED RT_BIT(1)
240/** Entry is dirty */
241#define PDMACFILECACHE_ENTRY_IS_DIRTY RT_BIT(2)
242/** Entry is not evictable. */
243#define PDMACFILECACHE_NOT_EVICTABLE (PDMACFILECACHE_ENTRY_LOCKED | PDMACFILECACHE_IO_IN_PROGRESS)
244
245/**
246 * LRU list data
247 */
248typedef struct PDMACFILELRULIST
249{
250 /** Head of the list. */
251 PPDMACFILECACHEENTRY pHead;
252 /** Tail of the list. */
253 PPDMACFILECACHEENTRY pTail;
254 /** Number of bytes cached in the list. */
255 uint32_t cbCached;
256} PDMACFILELRULIST;
257
258/**
259 * Global cache data.
260 */
261typedef struct PDMACFILECACHEGLOBAL
262{
263 /** Maximum size of the cache in bytes. */
264 uint32_t cbMax;
265 /** Current size of the cache in bytes. */
266 uint32_t cbCached;
267 /** Critical section protecting the cache. */
268 RTCRITSECT CritSect;
269 /** Adaption parameter (p) */
270 uint32_t uAdaptVal;
271 /** LRU list for recently used entries (T1) */
272 PDMACFILELRULIST LruRecentlyUsed;
273 /** LRU list for frequently used entries (T2) */
274 PDMACFILELRULIST LruFrequentlyUsed;
275 /** LRU list for recently evicted entries (B1) */
276 PDMACFILELRULIST LruRecentlyGhost;
277 /** LRU list for evicted entries from T2 (B2) */
278 PDMACFILELRULIST LruFrequentlyGhost;
279#ifdef VBOX_WITH_STATISTICS
280 /** Hit counter. */
281 STAMCOUNTER cHits;
282 /** Partial hit counter. */
283 STAMCOUNTER cPartialHits;
284 /** Miss counter. */
285 STAMCOUNTER cMisses;
286 /** Bytes read from cache. */
287 STAMCOUNTER StatRead;
288 /** Bytes written to the cache. */
289 STAMCOUNTER StatWritten;
290 /** Time spend to get an entry in the AVL tree. */
291 STAMPROFILEADV StatTreeGet;
292 /** Time spend to insert an entry in the AVL tree. */
293 STAMPROFILEADV StatTreeInsert;
294 /** Time spend to remove an entry in the AVL tree. */
295 STAMPROFILEADV StatTreeRemove;
296#endif
297} PDMACFILECACHEGLOBAL;
298
299/**
300 * Per endpoint cache data.
301 */
302typedef struct PDMACFILEENDPOINTCACHE
303{
304 /** AVL tree managing cache entries. */
305 PAVLRFOFFTREE pTree;
306 /** R/W semaphore protecting cached entries for this endpoint. */
307 RTSEMRW SemRWEntries;
308 /** Pointer to the gobal cache data */
309 PPDMACFILECACHEGLOBAL pCache;
310
311#ifdef VBOX_WITH_STATISTICS
312 /** Number of times a write was deferred because the cache entry was still in progress */
313 STAMCOUNTER StatWriteDeferred;
314#endif
315} PDMACFILEENDPOINTCACHE, *PPDMACFILEENDPOINTCACHE;
316
317/**
318 * Global data for the file endpoint class.
319 */
320typedef struct PDMASYNCCOMPLETIONEPCLASSFILE
321{
322 /** Common data. */
323 PDMASYNCCOMPLETIONEPCLASS Core;
324 /** Flag whether we use the failsafe method. */
325 bool fFailsafe;
326 /** Critical section protecting the list of async I/O managers. */
327 RTCRITSECT CritSect;
328 /** Pointer to the head of the async I/O managers. */
329 R3PTRTYPE(PPDMACEPFILEMGR) pAioMgrHead;
330 /** Number of async I/O managers currently running. */
331 unsigned cAioMgrs;
332 /** Maximum number of segments to cache per endpoint */
333 unsigned cTasksCacheMax;
334 /** Maximum number of simultaneous outstandingrequests. */
335 uint32_t cReqsOutstandingMax;
336 /** Bitmask for checking the alignment of a buffer. */
337 RTR3UINTPTR uBitmaskAlignment;
338 /** Global cache data. */
339 PDMACFILECACHEGLOBAL Cache;
340 /** Flag whether the out of resources warning was printed already. */
341 bool fOutOfResourcesWarningPrinted;
342} PDMASYNCCOMPLETIONEPCLASSFILE;
343/** Pointer to the endpoint class data. */
344typedef PDMASYNCCOMPLETIONEPCLASSFILE *PPDMASYNCCOMPLETIONEPCLASSFILE;
345
346typedef enum PDMACEPFILEBLOCKINGEVENT
347{
348 /** The invalid event type */
349 PDMACEPFILEBLOCKINGEVENT_INVALID = 0,
350 /** A task is about to be canceled */
351 PDMACEPFILEBLOCKINGEVENT_CANCEL,
352 /** Usual 32bit hack */
353 PDMACEPFILEBLOCKINGEVENT_32BIT_HACK = 0x7fffffff
354} PDMACEPFILEBLOCKINGEVENT;
355
356/**
357 * States of the endpoint.
358 */
359typedef enum PDMASYNCCOMPLETIONENDPOINTFILESTATE
360{
361 /** Invalid state. */
362 PDMASYNCCOMPLETIONENDPOINTFILESTATE_INVALID = 0,
363 /** Normal running state accepting new requests
364 * and processing them.
365 */
366 PDMASYNCCOMPLETIONENDPOINTFILESTATE_ACTIVE,
367 /** The endpoint is about to be closed - not accepting new tasks for endpoints but waiting for
368 * remaining ones to finish.
369 */
370 PDMASYNCCOMPLETIONENDPOINTFILESTATE_CLOSING,
371 /** Removing from current I/O manager state - not processing new tasks for endpoints but waiting
372 * for remaining ones to finish.
373 */
374 PDMASYNCCOMPLETIONENDPOINTFILESTATE_REMOVING,
375 /** The current endpoint will be migrated to another I/O manager. */
376 PDMASYNCCOMPLETIONENDPOINTFILESTATE_MIGRATING,
377 /** 32bit hack */
378 PDMASYNCCOMPLETIONENDPOINTFILESTATE_32BIT_HACK = 0x7fffffff
379} PDMASYNCCOMPLETIONENDPOINTFILESTATE;
380
381/**
382 * Data for the file endpoint.
383 */
384typedef struct PDMASYNCCOMPLETIONENDPOINTFILE
385{
386 /** Common data. */
387 PDMASYNCCOMPLETIONENDPOINT Core;
388 /** Current state of the endpoint. */
389 PDMASYNCCOMPLETIONENDPOINTFILESTATE enmState;
390 /** async I/O manager this endpoint is assigned to. */
391 R3PTRTYPE(volatile PPDMACEPFILEMGR) pAioMgr;
392 /** Flags for opening the file. */
393 unsigned fFlags;
394 /** File handle. */
395 RTFILE File;
396 /** Size of the underlying file.
397 * Updated while data is appended. */
398 volatile uint64_t cbFile;
399 /** Flag whether caching is enabled for this file. */
400 bool fCaching;
401 /** Flag whether the file was opened readonly. */
402 bool fReadonly;
403 /** List of new tasks. */
404 R3PTRTYPE(volatile PPDMACTASKFILE) pTasksNewHead;
405
406 /** Head of the small cache for allocated task segments for exclusive
407 * use by this endpoint. */
408 R3PTRTYPE(volatile PPDMACTASKFILE) pTasksFreeHead;
409 /** Tail of the small cache for allocated task segments for exclusive
410 * use by this endpoint. */
411 R3PTRTYPE(volatile PPDMACTASKFILE) pTasksFreeTail;
412 /** Number of elements in the cache. */
413 volatile uint32_t cTasksCached;
414
415 /** Cache of endpoint data. */
416 PDMACFILEENDPOINTCACHE DataCache;
417
418 /** Flag whether a flush request is currently active */
419 PPDMACTASKFILE pFlushReq;
420
421 /** Event sempahore for blocking external events.
422 * The caller waits on it until the async I/O manager
423 * finished processing the event. */
424 RTSEMEVENT EventSemBlock;
425 /** Flag whether a blocking event is pending and needs
426 * processing by the I/O manager. */
427 bool fBlockingEventPending;
428 /** Blocking event type */
429 PDMACEPFILEBLOCKINGEVENT enmBlockingEvent;
430
431#ifdef VBOX_WITH_STATISTICS
432 /** Time spend in a read. */
433 STAMPROFILEADV StatRead;
434 /** Time spend in a write. */
435 STAMPROFILEADV StatWrite;
436#endif
437
438 /** Additional data needed for the event types. */
439 union
440 {
441 /** Cancelation event. */
442 struct
443 {
444 /** The task to cancel. */
445 PPDMACTASKFILE pTask;
446 } Cancel;
447 } BlockingEventData;
448 /** Data for exclusive use by the assigned async I/O manager. */
449 struct
450 {
451 /** Pointer to the next endpoint assigned to the manager. */
452 R3PTRTYPE(PPDMASYNCCOMPLETIONENDPOINTFILE) pEndpointNext;
453 /** Pointer to the previous endpoint assigned to the manager. */
454 R3PTRTYPE(PPDMASYNCCOMPLETIONENDPOINTFILE) pEndpointPrev;
455 /** List of pending requests (not submitted due to usage restrictions
456 * or a pending flush request) */
457 R3PTRTYPE(PPDMACTASKFILE) pReqsPendingHead;
458 /** Tail of pending requests. */
459 R3PTRTYPE(PPDMACTASKFILE) pReqsPendingTail;
460 /** Number of requests currently being processed for this endpoint
461 * (excluded flush requests). */
462 unsigned cRequestsActive;
463 /** Number of requests processed during the last second. */
464 unsigned cReqsPerSec;
465 /** Current number of processed requests for the current update period. */
466 unsigned cReqsProcessed;
467 /** Flag whether the endpoint is about to be moved to another manager. */
468 bool fMoving;
469 /** Destination I/O manager. */
470 PPDMACEPFILEMGR pAioMgrDst;
471 } AioMgr;
472} PDMASYNCCOMPLETIONENDPOINTFILE;
473/** Pointer to the endpoint class data. */
474typedef PDMASYNCCOMPLETIONENDPOINTFILE *PPDMASYNCCOMPLETIONENDPOINTFILE;
475
476/** Request completion function */
477typedef DECLCALLBACK(void) FNPDMACTASKCOMPLETED(PPDMACTASKFILE pTask, void *pvUser);
478/** Pointer to a request completion function. */
479typedef FNPDMACTASKCOMPLETED *PFNPDMACTASKCOMPLETED;
480
481/**
482 * Transfer type.
483 */
484typedef enum PDMACTASKFILETRANSFER
485{
486 /** Invalid. */
487 PDMACTASKFILETRANSFER_INVALID = 0,
488 /** Read transfer. */
489 PDMACTASKFILETRANSFER_READ,
490 /** Write transfer. */
491 PDMACTASKFILETRANSFER_WRITE,
492 /** Flush transfer. */
493 PDMACTASKFILETRANSFER_FLUSH
494} PDMACTASKFILETRANSFER;
495
496/**
497 * Data of a request.
498 */
499typedef struct PDMACTASKFILE
500{
501 /** next task in the list. */
502 struct PDMACTASKFILE *pNext;
503 /** Endpoint */
504 PPDMASYNCCOMPLETIONENDPOINTFILE pEndpoint;
505 /** Transfer type. */
506 PDMACTASKFILETRANSFER enmTransferType;
507 /** Start offset */
508 RTFOFF Off;
509 /** Data segment. */
510 PDMDATASEG DataSeg;
511 /** Flag whether this segment uses a bounce buffer
512 * because the provided buffer doesn't meet host requirements. */
513 bool fBounceBuffer;
514 /** Pointer to the used bounce buffer if any. */
515 void *pvBounceBuffer;
516 /** Start offset in the bounce buffer to copy from. */
517 uint32_t uBounceBufOffset;
518 /** Flag whether this is a prefetch request. */
519 bool fPrefetch;
520 /** Completion function to call on completion. */
521 PFNPDMACTASKCOMPLETED pfnCompleted;
522 /** User data */
523 void *pvUser;
524} PDMACTASKFILE;
525
526/**
527 * Per task data.
528 */
529typedef struct PDMASYNCCOMPLETIONTASKFILE
530{
531 /** Common data. */
532 PDMASYNCCOMPLETIONTASK Core;
533 /** Number of bytes to transfer until this task completes. */
534 volatile int32_t cbTransferLeft;
535 /** Flag whether the task completed. */
536 volatile bool fCompleted;
537} PDMASYNCCOMPLETIONTASKFILE;
538
539int pdmacFileAioMgrFailsafe(RTTHREAD ThreadSelf, void *pvUser);
540int pdmacFileAioMgrNormal(RTTHREAD ThreadSelf, void *pvUser);
541
542int pdmacFileAioMgrNormalInit(PPDMACEPFILEMGR pAioMgr);
543void pdmacFileAioMgrNormalDestroy(PPDMACEPFILEMGR pAioMgr);
544
545int pdmacFileAioMgrCreate(PPDMASYNCCOMPLETIONEPCLASSFILE pEpClass, PPPDMACEPFILEMGR ppAioMgr, bool fFailsafe);
546
547int pdmacFileAioMgrAddEndpoint(PPDMACEPFILEMGR pAioMgr, PPDMASYNCCOMPLETIONENDPOINTFILE pEndpoint);
548
549PPDMACTASKFILE pdmacFileEpGetNewTasks(PPDMASYNCCOMPLETIONENDPOINTFILE pEndpoint);
550PPDMACTASKFILE pdmacFileTaskAlloc(PPDMASYNCCOMPLETIONENDPOINTFILE pEndpoint);
551void pdmacFileTaskFree(PPDMASYNCCOMPLETIONENDPOINTFILE pEndpoint,
552 PPDMACTASKFILE pTask);
553
554int pdmacFileEpAddTask(PPDMASYNCCOMPLETIONENDPOINTFILE pEndpoint, PPDMACTASKFILE pTask);
555
556void pdmacFileEpTaskCompleted(PPDMACTASKFILE pTask, void *pvUser);
557
558int pdmacFileCacheInit(PPDMASYNCCOMPLETIONEPCLASSFILE pClassFile, PCFGMNODE pCfgNode);
559void pdmacFileCacheDestroy(PPDMASYNCCOMPLETIONEPCLASSFILE pClassFile);
560int pdmacFileEpCacheInit(PPDMASYNCCOMPLETIONENDPOINTFILE pEndpoint, PPDMASYNCCOMPLETIONEPCLASSFILE pClassFile);
561void pdmacFileEpCacheDestroy(PPDMASYNCCOMPLETIONENDPOINTFILE pEndpoint);
562
563int pdmacFileEpCacheRead(PPDMASYNCCOMPLETIONENDPOINTFILE pEndpoint, PPDMASYNCCOMPLETIONTASKFILE pTask,
564 RTFOFF off, PCPDMDATASEG paSegments, size_t cSegments,
565 size_t cbRead);
566int pdmacFileEpCacheWrite(PPDMASYNCCOMPLETIONENDPOINTFILE pEndpoint, PPDMASYNCCOMPLETIONTASKFILE pTask,
567 RTFOFF off, PCPDMDATASEG paSegments, size_t cSegments,
568 size_t cbWrite);
569
570RT_C_DECLS_END
571
572#endif
573
Note: See TracBrowser for help on using the repository browser.

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