VirtualBox

Changeset 38847 in vbox for trunk/include/VBox/vmm


Ignore:
Timestamp:
Sep 23, 2011 1:19:23 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
74144
Message:

PDM: Enter the device critical section for PDM callback.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmdev.h

    r37516 r38847  
    7676 *
    7777 * @returns VBox status.
    78  * @param   pDevIns     The device instance data.
     78 * @param   pDevIns     The device instance data.
     79 * 
     80 * @remarks The device critical section is not entered.  The routine may delete
     81 *          the critical section, so the caller cannot exit it.
    7982 */
    8083typedef DECLCALLBACK(int)   FNPDMDEVDESTRUCT(PPDMDEVINS pDevIns);
     
    9699 * @param   offDelta    The relocation delta relative to the old location.
    97100 *
    98  * @remark  A relocation CANNOT fail.
     101 * @remarks A relocation CANNOT fail.
     102 * 
     103 * @remarks The device critical section is not entered.  The relocations should
     104 *          not normally require any locking.
    99105 */
    100106typedef DECLCALLBACK(void) FNPDMDEVRELOCATE(PPDMDEVINS pDevIns, RTGCINTPTR offDelta);
     
    117123 * @param   cbOut       Size of output data.
    118124 * @param   pcbOut      Where to store the actual size of the output data.
     125 * 
     126 * @remarks Not used.
    119127 */
    120128typedef DECLCALLBACK(int) FNPDMDEVIOCTL(PPDMDEVINS pDevIns, RTUINT uFunction,
     
    129137 * @returns VBox status.
    130138 * @param   pDevIns     The device instance data.
     139 * 
     140 * @remarks Caller enters the device critical section.
    131141 */
    132142typedef DECLCALLBACK(void)   FNPDMDEVPOWERON(PPDMDEVINS pDevIns);
     
    139149 * @returns VBox status.
    140150 * @param   pDevIns     The device instance data.
     151 * 
     152 * @remarks Caller enters the device critical section.
    141153 */
    142154typedef DECLCALLBACK(void)  FNPDMDEVRESET(PPDMDEVINS pDevIns);
     
    150162 * @param   pDevIns     The device instance data.
    151163 * @thread  EMT(0)
     164 * 
     165 * @remarks Caller enters the device critical section.
    152166 */
    153167typedef DECLCALLBACK(void)  FNPDMDEVSUSPEND(PPDMDEVINS pDevIns);
     
    160174 * @returns VBox status.
    161175 * @param   pDevIns     The device instance data.
     176 * 
     177 * @remarks Caller enters the device critical section.
    162178 */
    163179typedef DECLCALLBACK(void)  FNPDMDEVRESUME(PPDMDEVINS pDevIns);
     
    174190 * @param   pDevIns     The device instance data.
    175191 * @thread  EMT(0)
     192 * 
     193 * @remarks Caller enters the device critical section.
    176194 */
    177195typedef DECLCALLBACK(void)   FNPDMDEVPOWEROFF(PPDMDEVINS pDevIns);
     
    192210 * @param   iLUN        The logical unit which is being detached.
    193211 * @param   fFlags      Flags, combination of the PDM_TACH_FLAGS_* \#defines.
     212 * 
     213 * @remarks Caller enters the device critical section.
    194214 */
    195215typedef DECLCALLBACK(int)  FNPDMDEVATTACH(PPDMDEVINS pDevIns, unsigned iLUN, uint32_t fFlags);
     
    209229 * @param   iLUN        The logical unit which is being detached.
    210230 * @param   fFlags      Flags, combination of the PDMDEVATT_FLAGS_* \#defines.
     231 * 
     232 * @remarks Caller enters the device critical section.
    211233 */
    212234typedef DECLCALLBACK(void)  FNPDMDEVDETACH(PPDMDEVINS pDevIns, unsigned iLUN, uint32_t fFlags);
     
    221243 * @param   iLUN        The logicial unit to query.
    222244 * @param   ppBase      Where to store the pointer to the base interface of the LUN.
     245 * 
     246 * @remarks The device critical section is not entered.
    223247 */
    224248typedef DECLCALLBACK(int) FNPDMDEVQUERYINTERFACE(PPDMDEVINS pDevIns, unsigned iLUN, PPDMIBASE *ppBase);
     
    233257 * @returns VBOX status code.
    234258 * @param   pDevIns     The device instance.
     259 * 
     260 * @remarks Caller enters the device critical section.
    235261 */
    236262typedef DECLCALLBACK(int) FNPDMDEVINITCOMPLETE(PPDMDEVINS pDevIns);
     
    273299    /** Construct instance - required. */
    274300    PFNPDMDEVCONSTRUCT  pfnConstruct;
    275     /** Destruct instance - optional. */
     301    /** Destruct instance - optional.
     302     * Critical section NOT entered (will be destroyed).  */
    276303    PFNPDMDEVDESTRUCT   pfnDestruct;
    277     /** Relocation command - optional. */
     304    /** Relocation command - optional.
     305     * Critical section NOT entered. */
    278306    PFNPDMDEVRELOCATE   pfnRelocate;
    279     /** I/O Control interface - optional. */
     307    /** I/O Control interface - optional.
     308     * Not used.  */
    280309    PFNPDMDEVIOCTL      pfnIOCtl;
    281     /** Power on notification - optional. */
     310    /** Power on notification - optional.
     311     * Critical section is entered. */
    282312    PFNPDMDEVPOWERON    pfnPowerOn;
    283     /** Reset notification - optional. */
     313    /** Reset notification - optional.
     314     * Critical section is entered. */
    284315    PFNPDMDEVRESET      pfnReset;
    285     /** Suspend notification  - optional. */
     316    /** Suspend notification  - optional.
     317     * Critical section is entered. */
    286318    PFNPDMDEVSUSPEND    pfnSuspend;
    287     /** Resume notification - optional. */
     319    /** Resume notification - optional.
     320     * Critical section is entered. */
    288321    PFNPDMDEVRESUME     pfnResume;
    289     /** Attach command - optional. */
     322    /** Attach command - optional.
     323     * Critical section is entered. */
    290324    PFNPDMDEVATTACH     pfnAttach;
    291     /** Detach notification - optional. */
     325    /** Detach notification - optional.
     326     * Critical section is entered. */
    292327    PFNPDMDEVDETACH     pfnDetach;
    293     /** Query a LUN base interface - optional. */
     328    /** Query a LUN base interface - optional.
     329     * Critical section is NOT entered. */
    294330    PFNPDMDEVQUERYINTERFACE pfnQueryInterface;
    295     /** Init complete notification - optional. */
     331    /** Init complete notification - optional.
     332     * Critical section is entered. */
    296333    PFNPDMDEVINITCOMPLETE   pfnInitComplete;
    297     /** Power off notification - optional. */
     334    /** Power off notification - optional.
     335     * Critical section is entered. */
    298336    PFNPDMDEVPOWEROFF   pfnPowerOff;
    299337    /** @todo */
     
    38633901    /** The critical section for the device.
    38643902     *
    3865      * TM and IOM will enter this critical section before calling into the
    3866      * device code.  SSM will currently not, but this will be changed later on.
     3903     * TM and IOM will enter this critical section before calling into the device
     3904     * code.  PDM will when doing power on, power off, reset, suspend and resume
     3905     * notifications.  SSM will currently not, but this will be changed later on.
    38673906     *
    38683907     * The device gets a critical section automatically assigned to it before
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