VirtualBox

Changeset 80531 in vbox for trunk/src/VBox/Devices/Samples


Ignore:
Timestamp:
Sep 1, 2019 11:03:34 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
133038
Message:

VMM,Devices: Some PDM device model refactoring. bugref:9218

Location:
trunk/src/VBox/Devices/Samples
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Samples/DevPlayground.cpp

    r77828 r80531  
    341341static const PDMDEVREG g_DevicePlayground =
    342342{
    343     /* u32Version */
    344     PDM_DEVREG_VERSION,
    345     /* szName */
    346     "playground",
    347     /* szRCMod */
    348     "",
    349     /* szR0Mod */
    350     "",
    351     /* pszDescription */
    352     "VBox Playground Device.",
    353     /* fFlags */
    354     PDM_DEVREG_FLAGS_DEFAULT_BITS,
    355     /* fClass */
    356     PDM_DEVREG_CLASS_MISC,
    357     /* cMaxInstances */
    358     1,
    359     /* cbInstance */
    360     sizeof(VBOXPLAYGROUNDDEVICE),
    361     /* pfnConstruct */
    362     devPlaygroundConstruct,
    363     /* pfnDestruct */
    364     devPlaygroundDestruct,
    365     /* pfnRelocate */
    366     NULL,
    367     /* pfnMemSetup */
    368     NULL,
    369     /* pfnPowerOn */
    370     NULL,
    371     /* pfnReset */
    372     NULL,
    373     /* pfnSuspend */
    374     NULL,
    375     /* pfnResume */
    376     NULL,
    377     /* pfnAttach */
    378     NULL,
    379     /* pfnDetach */
    380     NULL,
    381     /* pfnQueryInterface */
    382     NULL,
    383     /* pfnInitComplete */
    384     NULL,
    385     /* pfnPowerOff */
    386     NULL,
    387     /* pfnSoftReset */
    388     NULL,
    389     /* u32VersionEnd */
    390     PDM_DEVREG_VERSION
     343    /* .u32Version = */             PDM_DEVREG_VERSION,
     344    /* .uReserved0 = */             0,
     345    /* .szName = */                 "playground",
     346    /* .fFlags = */                 PDM_DEVREG_FLAGS_DEFAULT_BITS,
     347    /* .fClass = */                 PDM_DEVREG_CLASS_MISC,
     348    /* .cMaxInstances = */          1,
     349    /* .uSharedVersion = */         42,
     350    /* .cbInstanceShared = */       sizeof(VBOXPLAYGROUNDDEVICE),
     351    /* .cbInstanceCC = */           0,
     352    /* .cbInstanceRC = */           0,
     353    /* .uReserved1 = */             0,
     354    /* .pszDescription = */         "VBox Playground Device.",
     355#if defined(IN_RING3)
     356    /* .pszRCMod = */               "",
     357    /* .pszR0Mod = */               "",
     358    /* .pfnConstruct = */           devPlaygroundConstruct,
     359    /* .pfnDestruct = */            devPlaygroundDestruct,
     360    /* .pfnRelocate = */            NULL,
     361    /* .pfnMemSetup = */            NULL,
     362    /* .pfnPowerOn = */             NULL,
     363    /* .pfnReset = */               NULL,
     364    /* .pfnSuspend = */             NULL,
     365    /* .pfnResume = */              NULL,
     366    /* .pfnAttach = */              NULL,
     367    /* .pfnDetach = */              NULL,
     368    /* .pfnQueryInterface = */      NULL,
     369    /* .pfnInitComplete = */        NULL,
     370    /* .pfnPowerOff = */            NULL,
     371    /* .pfnSoftReset = */           NULL,
     372    /* .pfnReserved0 = */           NULL,
     373    /* .pfnReserved1 = */           NULL,
     374    /* .pfnReserved2 = */           NULL,
     375    /* .pfnReserved3 = */           NULL,
     376    /* .pfnReserved4 = */           NULL,
     377    /* .pfnReserved5 = */           NULL,
     378    /* .pfnReserved6 = */           NULL,
     379    /* .pfnReserved7 = */           NULL,
     380#elif defined(IN_RING0)
     381    /* .pfnEarlyConstruct = */      NULL,
     382    /* .pfnConstruct = */           NULL,
     383    /* .pfnDestruct = */            NULL,
     384    /* .pfnFinalDestruct = */       NULL,
     385    /* .pfnRequest = */             NULL,
     386    /* .pfnReserved0 = */           NULL,
     387    /* .pfnReserved1 = */           NULL,
     388    /* .pfnReserved2 = */           NULL,
     389    /* .pfnReserved3 = */           NULL,
     390    /* .pfnReserved4 = */           NULL,
     391    /* .pfnReserved5 = */           NULL,
     392    /* .pfnReserved6 = */           NULL,
     393    /* .pfnReserved7 = */           NULL,
     394#elif defined(IN_RC)
     395    /* .pfnConstruct = */           NULL,
     396    /* .pfnReserved0 = */           NULL,
     397    /* .pfnReserved1 = */           NULL,
     398    /* .pfnReserved2 = */           NULL,
     399    /* .pfnReserved3 = */           NULL,
     400    /* .pfnReserved4 = */           NULL,
     401    /* .pfnReserved5 = */           NULL,
     402    /* .pfnReserved6 = */           NULL,
     403    /* .pfnReserved7 = */           NULL,
     404#else
     405# error "Not in IN_RING3, IN_RING0 or IN_RC!"
     406#endif
     407    /* .u32VersionEnd = */          PDM_DEVREG_VERSION
    391408};
    392409
  • trunk/src/VBox/Devices/Samples/VBoxSampleDevice.cpp

    r76553 r80531  
    8989static const PDMDEVREG g_DeviceSample =
    9090{
    91     /* u32Version */
    92     PDM_DEVREG_VERSION,
    93     /* szName */
    94     "sample",
    95     /* szRCMod */
    96     "",
    97     /* szR0Mod */
    98     "",
    99     /* pszDescription */
    100     "VBox Sample Device.",
    101     /* fFlags */
    102     PDM_DEVREG_FLAGS_DEFAULT_BITS,
    103     /* fClass */
    104     PDM_DEVREG_CLASS_MISC,
    105     /* cMaxInstances */
    106     1,
    107     /* cbInstance */
    108     sizeof(VBOXSAMPLEDEVICE),
    109     /* pfnConstruct */
    110     devSampleConstruct,
    111     /* pfnDestruct */
    112     devSampleDestruct,
    113     /* pfnRelocate */
    114     NULL,
    115     /* pfnMemSetup */
    116     NULL,
    117     /* pfnPowerOn */
    118     NULL,
    119     /* pfnReset */
    120     NULL,
    121     /* pfnSuspend */
    122     NULL,
    123     /* pfnResume */
    124     NULL,
    125     /* pfnAttach */
    126     NULL,
    127     /* pfnDetach */
    128     NULL,
    129     /* pfnQueryInterface */
    130     NULL,
    131     /* pfnInitComplete */
    132     NULL,
    133     /* pfnPowerOff */
    134     NULL,
    135     /* pfnSoftReset */
    136     NULL,
    137     /* u32VersionEnd */
    138     PDM_DEVREG_VERSION
     91    /* .u32Version = */             PDM_DEVREG_VERSION,
     92    /* .uReserved0 = */             0,
     93    /* .szName = */                 "sample",
     94    /* .fFlags = */                 PDM_DEVREG_FLAGS_DEFAULT_BITS,
     95    /* .fClass = */                 PDM_DEVREG_CLASS_MISC,
     96    /* .cMaxInstances = */          1,
     97    /* .uSharedVersion = */         42,
     98    /* .cbInstanceShared = */       sizeof(VBOXSAMPLEDEVICE),
     99    /* .cbInstanceCC = */           0,
     100    /* .cbInstanceRC = */           0,
     101    /* .uReserved1 = */             0,
     102    /* .pszDescription = */         "VBox Sample Device.",
     103#if defined(IN_RING3)
     104    /* .pszRCMod = */               "",
     105    /* .pszR0Mod = */               "",
     106    /* .pfnConstruct = */           devSampleConstruct,
     107    /* .pfnDestruct = */            devSampleDestruct,
     108    /* .pfnRelocate = */            NULL,
     109    /* .pfnMemSetup = */            NULL,
     110    /* .pfnPowerOn = */             NULL,
     111    /* .pfnReset = */               NULL,
     112    /* .pfnSuspend = */             NULL,
     113    /* .pfnResume = */              NULL,
     114    /* .pfnAttach = */              NULL,
     115    /* .pfnDetach = */              NULL,
     116    /* .pfnQueryInterface = */      NULL,
     117    /* .pfnInitComplete = */        NULL,
     118    /* .pfnPowerOff = */            NULL,
     119    /* .pfnSoftReset = */           NULL,
     120    /* .pfnReserved0 = */           NULL,
     121    /* .pfnReserved1 = */           NULL,
     122    /* .pfnReserved2 = */           NULL,
     123    /* .pfnReserved3 = */           NULL,
     124    /* .pfnReserved4 = */           NULL,
     125    /* .pfnReserved5 = */           NULL,
     126    /* .pfnReserved6 = */           NULL,
     127    /* .pfnReserved7 = */           NULL,
     128#elif defined(IN_RING0)
     129    /* .pfnEarlyConstruct = */      NULL,
     130    /* .pfnConstruct = */           NULL,
     131    /* .pfnDestruct = */            NULL,
     132    /* .pfnFinalDestruct = */       NULL,
     133    /* .pfnRequest = */             NULL,
     134    /* .pfnReserved0 = */           NULL,
     135    /* .pfnReserved1 = */           NULL,
     136    /* .pfnReserved2 = */           NULL,
     137    /* .pfnReserved3 = */           NULL,
     138    /* .pfnReserved4 = */           NULL,
     139    /* .pfnReserved5 = */           NULL,
     140    /* .pfnReserved6 = */           NULL,
     141    /* .pfnReserved7 = */           NULL,
     142#elif defined(IN_RC)
     143    /* .pfnConstruct = */           NULL,
     144    /* .pfnReserved0 = */           NULL,
     145    /* .pfnReserved1 = */           NULL,
     146    /* .pfnReserved2 = */           NULL,
     147    /* .pfnReserved3 = */           NULL,
     148    /* .pfnReserved4 = */           NULL,
     149    /* .pfnReserved5 = */           NULL,
     150    /* .pfnReserved6 = */           NULL,
     151    /* .pfnReserved7 = */           NULL,
     152#else
     153# error "Not in IN_RING3, IN_RING0 or IN_RC!"
     154#endif
     155    /* .u32VersionEnd = */          PDM_DEVREG_VERSION
    139156};
    140157
Note: See TracChangeset for help on using the changeset viewer.

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