VirtualBox

source: vbox/trunk/src/VBox/Storage/testcase/VDIoRnd.h@ 44891

Last change on this file since 44891 was 35596, checked in by vboxsync, 14 years ago

Storage/tstVDIo: Basic working testcase for async and sync I/O

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.6 KB
Line 
1/** @file
2 *
3 * VBox HDD container test utility - I/O data generator.
4 */
5
6/*
7 * Copyright (C) 2011 Oracle Corporation
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#ifndef _VDIoRnd_h__
18#define _VDIoRnd_h__
19
20/** Pointer to the I/O random number generator. */
21typedef struct VDIORND *PVDIORND;
22/** Pointer to a I/O random number generator pointer. */
23typedef PVDIORND *PPVDIORND;
24
25/**
26 * Creates a I/O RNG.
27 *
28 * @returns VBox status code.
29 *
30 * @param ppIoRnd Where to store the handle on success.
31 * @param cbPattern Size of the test pattern to create.
32 * @param uSeed Seed for the RNG.
33 */
34int VDIoRndCreate(PPVDIORND ppIoRnd, size_t cbPattern, uint64_t uSeed);
35
36/**
37 * Destroys the I/O RNG.
38 *
39 * @param pIoRnd I/O RNG handle.
40 */
41void VDIoRndDestroy(PVDIORND pIoRnd);
42
43/**
44 * Returns a pointer filled with random data of the given size.
45 *
46 * @returns VBox status code.
47 *
48 * @param pIoRnd I/O RNG handle.
49 * @param ppv Where to store the pointer on success.
50 * @param cb Size of the buffer.
51 */
52int VDIoRndGetBuffer(PVDIORND pIoRnd, void **ppv, size_t cb);
53
54uint32_t VDIoRndGetU32Ex(PVDIORND pIoRnd, uint32_t uMin, uint32_t uMax);
55#endif /* _VDIoRnd_h__ */
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