1 | /* $Id: VBoxMPCrUtil.cpp 69498 2017-10-28 15:07:25Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox WDDM Miniport driver
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2012-2016 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 |
|
---|
18 | #include "VBoxMPWddm.h"
|
---|
19 |
|
---|
20 | #include <iprt/cdefs.h>
|
---|
21 |
|
---|
22 | RT_C_DECLS_BEGIN
|
---|
23 |
|
---|
24 | DECLEXPORT(void *) crAlloc( unsigned int nbytes );
|
---|
25 | //extern DECLEXPORT(void *) crCalloc( unsigned int nbytes );
|
---|
26 | //extern DECLEXPORT(void) crRealloc( void **ptr, unsigned int bytes );
|
---|
27 | DECLEXPORT(void) crFree( void *ptr );
|
---|
28 | DECLEXPORT(void) crMemcpy( void *dst, const void *src, unsigned int bytes );
|
---|
29 | DECLEXPORT(void) crMemset( void *ptr, int value, unsigned int bytes );
|
---|
30 | DECLEXPORT(void) crMemZero( void *ptr, unsigned int bytes );
|
---|
31 | DECLEXPORT(int) crMemcmp( const void *p1, const void *p2, unsigned int bytes );
|
---|
32 | DECLEXPORT(void) crDebug(const char *format, ... );
|
---|
33 | #ifndef DEBUG_misha
|
---|
34 | DECLEXPORT(void) crWarning(const char *format, ... );
|
---|
35 | #endif
|
---|
36 |
|
---|
37 | DECLEXPORT(void) crInfo(const char *format, ... );
|
---|
38 | DECLEXPORT(void) crError(const char *format, ... );
|
---|
39 |
|
---|
40 | RT_C_DECLS_END
|
---|
41 |
|
---|
42 | DECLEXPORT(void *) crAlloc( unsigned int nbytes )
|
---|
43 | {
|
---|
44 | return vboxWddmMemAllocZero(nbytes);
|
---|
45 | }
|
---|
46 | //extern DECLEXPORT(void *) crCalloc( unsigned int nbytes );
|
---|
47 | //extern DECLEXPORT(void) crRealloc( void **ptr, unsigned int bytes );
|
---|
48 | DECLEXPORT(void) crFree( void *ptr )
|
---|
49 | {
|
---|
50 | vboxWddmMemFree(ptr);
|
---|
51 | }
|
---|
52 |
|
---|
53 | DECLEXPORT(void) crMemcpy( void *dst, const void *src, unsigned int bytes )
|
---|
54 | {
|
---|
55 | memcpy(dst, src, bytes);
|
---|
56 | }
|
---|
57 |
|
---|
58 | DECLEXPORT(void) crMemset( void *ptr, int value, unsigned int bytes )
|
---|
59 | {
|
---|
60 | memset(ptr, value, bytes);
|
---|
61 | }
|
---|
62 |
|
---|
63 | DECLEXPORT(void) crMemZero( void *ptr, unsigned int bytes )
|
---|
64 | {
|
---|
65 | memset(ptr, 0, bytes);
|
---|
66 | }
|
---|
67 |
|
---|
68 | DECLEXPORT(int) crMemcmp( const void *p1, const void *p2, unsigned int bytes )
|
---|
69 | {
|
---|
70 | return memcmp(p1, p2, bytes);
|
---|
71 | }
|
---|
72 |
|
---|
73 | DECLEXPORT(void) crDebug(const char *format, ... )
|
---|
74 | {
|
---|
75 | RT_NOREF(format);
|
---|
76 | }
|
---|
77 |
|
---|
78 | #ifndef DEBUG_misha
|
---|
79 | DECLEXPORT(void) crWarning(const char *format, ... )
|
---|
80 | {
|
---|
81 | RT_NOREF(format);
|
---|
82 | }
|
---|
83 | #endif
|
---|
84 |
|
---|
85 | DECLEXPORT(void) crInfo(const char *format, ... )
|
---|
86 | {
|
---|
87 | RT_NOREF(format);
|
---|
88 | }
|
---|
89 |
|
---|
90 | DECLEXPORT(void) crError(const char *format, ... )
|
---|
91 | {
|
---|
92 | RT_NOREF(format);
|
---|
93 | }
|
---|
94 |
|
---|