Changeset 18645 in vbox for trunk/include/VBox
- Timestamp:
- Apr 2, 2009 3:38:31 PM (16 years ago)
- Location:
- trunk/include/VBox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/pdmdev.h
r18143 r18645 2113 2113 * @returns VBox status code. 2114 2114 * @param pDevIns Device instance. 2115 * @param fF atal Whether it is a fatal error or not.2116 * @param pszErrorI DError ID string.2115 * @param fFlags The action flags. See VMSETRTERR_FLAGS_*. 2116 * @param pszErrorId Error ID string. 2117 2117 * @param pszFormat Error message format string. 2118 2118 * @param ... Error message arguments. 2119 2119 */ 2120 DECLR3CALLBACKMEMBER(int, pfnVMSetRuntimeError,(PPDMDEVINS pDevIns, bool fFatal, const char *pszErrorID, const char *pszFormat, ...));2120 DECLR3CALLBACKMEMBER(int, pfnVMSetRuntimeError,(PPDMDEVINS pDevIns, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, ...)); 2121 2121 2122 2122 /** … … 2125 2125 * @returns VBox status code. 2126 2126 * @param pDevIns Device instance. 2127 * @param fF atal Whether it is a fatal error or not.2128 * @param pszErrorI DError ID string.2127 * @param fFlags The action flags. See VMSETRTERR_FLAGS_*. 2128 * @param pszErrorId Error ID string. 2129 2129 * @param pszFormat Error message format string. 2130 2130 * @param va Error message arguments. 2131 2131 */ 2132 DECLR3CALLBACKMEMBER(int, pfnVMSetRuntimeErrorV,(PPDMDEVINS pDevIns, bool fFatal, const char *pszErrorID, const char *pszFormat, va_list va));2132 DECLR3CALLBACKMEMBER(int, pfnVMSetRuntimeErrorV,(PPDMDEVINS pDevIns, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, va_list va)); 2133 2133 2134 2134 /** … … 2950 2950 * @returns VBox status code. 2951 2951 * @param pDevIns Device instance. 2952 * @param fF atal Whether it is a fatal error or not.2953 * @param pszErrorI DError ID string.2952 * @param fFlags The action flags. See VMSETRTERR_FLAGS_*. 2953 * @param pszErrorId Error ID string. 2954 2954 * @param pszFormat Error message format string. 2955 2955 * @param ... Error message arguments. 2956 2956 */ 2957 DECLRCCALLBACKMEMBER(int, pfnVMSetRuntimeError,(PPDMDEVINS pDevIns, bool fFatal, const char *pszErrorID, const char *pszFormat, ...));2957 DECLRCCALLBACKMEMBER(int, pfnVMSetRuntimeError,(PPDMDEVINS pDevIns, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, ...)); 2958 2958 2959 2959 /** … … 2962 2962 * @returns VBox status code. 2963 2963 * @param pDevIns Device instance. 2964 * @param fF atal Whether it is a fatal error or not.2965 * @param pszErrorI DError ID string.2964 * @param fFlags The action flags. See VMSETRTERR_FLAGS_*. 2965 * @param pszErrorId Error ID string. 2966 2966 * @param pszFormat Error message format string. 2967 2967 * @param va Error message arguments. 2968 2968 */ 2969 DECLRCCALLBACKMEMBER(int, pfnVMSetRuntimeErrorV,(PPDMDEVINS pDevIns, bool fFatal, const char *pszErrorID, const char *pszFormat, va_list va));2969 DECLRCCALLBACKMEMBER(int, pfnVMSetRuntimeErrorV,(PPDMDEVINS pDevIns, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, va_list va)); 2970 2970 2971 2971 /** … … 3088 3088 * @returns VBox status code. 3089 3089 * @param pDevIns Device instance. 3090 * @param fF atal Whether it is a fatal error or not.3091 * @param pszErrorI DError ID string.3090 * @param fFlags The action flags. See VMSETRTERR_FLAGS_*. 3091 * @param pszErrorId Error ID string. 3092 3092 * @param pszFormat Error message format string. 3093 3093 * @param ... Error message arguments. 3094 3094 */ 3095 DECLR0CALLBACKMEMBER(int, pfnVMSetRuntimeError,(PPDMDEVINS pDevIns, bool fFatal, const char *pszErrorID, const char *pszFormat, ...));3095 DECLR0CALLBACKMEMBER(int, pfnVMSetRuntimeError,(PPDMDEVINS pDevIns, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, ...)); 3096 3096 3097 3097 /** … … 3100 3100 * @returns VBox status code. 3101 3101 * @param pDevIns Device instance. 3102 * @param fF atal Whether it is a fatal error or not.3103 * @param pszErrorI DError ID string.3102 * @param fFlags The action flags. See VMSETRTERR_FLAGS_*. 3103 * @param pszErrorId Error ID string. 3104 3104 * @param pszFormat Error message format string. 3105 3105 * @param va Error message arguments. 3106 3106 */ 3107 DECLR0CALLBACKMEMBER(int, pfnVMSetRuntimeErrorV,(PPDMDEVINS pDevIns, bool fFatal, const char *pszErrorID, const char *pszFormat, va_list va));3107 DECLR0CALLBACKMEMBER(int, pfnVMSetRuntimeErrorV,(PPDMDEVINS pDevIns, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, va_list va)); 3108 3108 3109 3109 /** … … 3241 3241 * Set the VM runtime error. See PDMDevHlpVMSetRuntimeError() for printf like message formatting. 3242 3242 */ 3243 #define PDMDEV_SET_RUNTIME_ERROR(pDevIns, fF atal, pszErrorID, pszError) \3244 PDMDevHlpVMSetRuntimeError(pDevIns, fF atal, pszErrorID, "%s", pszError)3243 #define PDMDEV_SET_RUNTIME_ERROR(pDevIns, fFlags, pszErrorId, pszError) \ 3244 PDMDevHlpVMSetRuntimeError(pDevIns, fFlags, pszErrorId, "%s", pszError) 3245 3245 3246 3246 /** @def PDMDEVINS_2_RCPTR … … 3827 3827 * @copydoc PDMDEVHLPR3::pfnVMSetRuntimeError 3828 3828 */ 3829 DECLINLINE(int) PDMDevHlpVMSetRuntimeError(PPDMDEVINS pDevIns, bool fFatal, const char *pszErrorID, const char *pszFormat, ...)3829 DECLINLINE(int) PDMDevHlpVMSetRuntimeError(PPDMDEVINS pDevIns, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, ...) 3830 3830 { 3831 3831 va_list va; 3832 3832 int rc; 3833 3833 va_start(va, pszFormat); 3834 rc = pDevIns->CTX_SUFF(pDevHlp)->pfnVMSetRuntimeErrorV(pDevIns, fF atal, pszErrorID, pszFormat, va);3834 rc = pDevIns->CTX_SUFF(pDevHlp)->pfnVMSetRuntimeErrorV(pDevIns, fFlags, pszErrorId, pszFormat, va); 3835 3835 va_end(va); 3836 3836 return rc; -
trunk/include/VBox/pdmdrv.h
r15940 r18645 453 453 * @returns VBox status code. 454 454 * @param pDrvIns Driver instance. 455 * @param fF atal Whether it is a fatal error or not.456 * @param pszErrorI DError ID string.455 * @param fFlags The action flags. See VMSETRTERR_FLAGS_*. 456 * @param pszErrorId Error ID string. 457 457 * @param pszFormat Error message format string. 458 458 * @param ... Error message arguments. 459 459 */ 460 DECLR3CALLBACKMEMBER(int, pfnVMSetRuntimeError,(PPDMDRVINS pDrvIns, bool fFatal, const char *pszErrorID, const char *pszFormat, ...));460 DECLR3CALLBACKMEMBER(int, pfnVMSetRuntimeError,(PPDMDRVINS pDrvIns, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, ...)); 461 461 462 462 /** … … 465 465 * @returns VBox status code. 466 466 * @param pDrvIns Driver instance. 467 * @param fF atal Whether it is a fatal error or not.468 * @param pszErrorI DError ID string.467 * @param fFlags The action flags. See VMSETRTERR_FLAGS_*. 468 * @param pszErrorId Error ID string. 469 469 * @param pszFormat Error message format string. 470 470 * @param va Error message arguments. 471 471 */ 472 DECLR3CALLBACKMEMBER(int, pfnVMSetRuntimeErrorV,(PPDMDRVINS pDrvIns, bool fFatal, const char *pszErrorID, const char *pszFormat, va_list va));472 DECLR3CALLBACKMEMBER(int, pfnVMSetRuntimeErrorV,(PPDMDRVINS pDrvIns, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, va_list va)); 473 473 474 474 /** … … 769 769 * @copydoc PDMDRVHLP::pfnVMSetRuntimeError 770 770 */ 771 DECLINLINE(int) PDMDrvHlpVMSetRuntimeError(PPDMDRVINS pDrvIns, bool fFatal, const char *pszErrorID, const char *pszFormat, ...)771 DECLINLINE(int) PDMDrvHlpVMSetRuntimeError(PPDMDRVINS pDrvIns, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, ...) 772 772 { 773 773 va_list va; 774 774 int rc; 775 775 va_start(va, pszFormat); 776 rc = pDrvIns->pDrvHlp->pfnVMSetRuntimeErrorV(pDrvIns, fF atal, pszErrorID, pszFormat, va);776 rc = pDrvIns->pDrvHlp->pfnVMSetRuntimeErrorV(pDrvIns, fFlags, pszErrorId, pszFormat, va); 777 777 va_end(va); 778 778 return rc; … … 782 782 * Set the VM runtime error. See PDMDrvHlpVMSetRuntimeError() for printf like message formatting. 783 783 */ 784 #define PDMDRV_SET_RUNTIME_ERROR(pDrvIns, fF atal, pszErrorID, pszError) \785 PDMDrvHlpVMSetRuntimeError(pDrvIns, fF atal, pszErrorID, "%s", pszError)784 #define PDMDRV_SET_RUNTIME_ERROR(pDrvIns, fFlags, pszErrorId, pszError) \ 785 PDMDrvHlpVMSetRuntimeError(pDrvIns, fFlags, pszErrorId, "%s", pszError) 786 786 787 787 #endif /* IN_RING3 */ -
trunk/include/VBox/pdmusb.h
r13005 r18645 555 555 * @returns VBox status code. 556 556 * @param pUsbIns The USB device instance. 557 * @param fF atal Whether it is a fatal error or not.558 * @param pszErrorI DError ID string.557 * @param fFlags The action flags. See VMSETRTERR_FLAGS_*. 558 * @param pszErrorId Error ID string. 559 559 * @param pszFormat Error message format string. 560 560 * @param va Error message arguments. 561 561 */ 562 DECLR3CALLBACKMEMBER(int, pfnVMSetRuntimeErrorV,(PPDMUSBINS pUsbIns, bool fFatal, const char *pszErrorID, const char *pszFormat, va_list va));562 DECLR3CALLBACKMEMBER(int, pfnVMSetRuntimeErrorV,(PPDMUSBINS pUsbIns, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, va_list va)); 563 563 564 564 /** … … 660 660 661 661 /** @def PDMUSB_SET_ERROR 662 * Set the VM error. See PDMDevHlpVMSetError() for printf like message formatting. 662 * Set the VM error. See PDMUsbHlpVMSetError() for printf like message 663 * formatting. 663 664 */ 664 665 #define PDMUSB_SET_ERROR(pUsbIns, rc, pszError) \ 665 PDM DevHlpVMSetError(pUsbIns, rc, RT_SRC_POS, "%s", pszError)666 PDMUsbHlpVMSetError(pUsbIns, rc, RT_SRC_POS, "%s", pszError) 666 667 667 668 /** @def PDMUSB_SET_RUNTIME_ERROR 668 * Set the VM runtime error. See PDMDevHlpVMSetRuntimeError() for printf like message formatting. 669 */ 670 #define PDMUSB_SET_RUNTIME_ERROR(pUsbIns, fFatal, pszErrorID, pszError) \ 671 PDMDevHlpVMSetRuntimeError(pUsbIns, fFatal, pszErrorID, "%s", pszError) 669 * Set the VM runtime error. See PDMUsbHlpVMSetRuntimeError() for printf like 670 * message formatting. 671 */ 672 #define PDMUSB_SET_RUNTIME_ERROR(pUsbIns, fFlags, pszErrorId, pszError) \ 673 PDMUsbHlpVMSetRuntimeError(pUsbIns, fFlags, pszErrorId, "%s", pszError) 672 674 673 675 -
trunk/include/VBox/vmapi.h
r15317 r18645 131 131 /** 132 132 * VM runtime error callback function. 133 * 133 134 * See VMSetRuntimeError for the detailed description of parameters. 134 135 * 135 136 * @param pVM The VM handle. 136 137 * @param pvUser The user argument. 137 * @param fF atal Whether it is a fatal error or not.138 * @param pszErrorI DError ID string.138 * @param fFlags The error flags. 139 * @param pszErrorId Error ID string. 139 140 * @param pszFormat Error message format string. 140 * @param args Error message arguments. 141 */ 142 typedef DECLCALLBACK(void) FNVMATRUNTIMEERROR(PVM pVM, void *pvUser, bool fFatal, 143 const char *pszErrorID, 144 const char *pszFormat, va_list args); 141 * @param va Error message arguments. 142 */ 143 typedef DECLCALLBACK(void) FNVMATRUNTIMEERROR(PVM pVM, void *pvUser, uint32_t fFlags, const char *pszErrorId, 144 const char *pszFormat, va_list va); 145 145 /** Pointer to a VM runtime error callback. */ 146 146 typedef FNVMATRUNTIMEERROR *PFNVMATRUNTIMEERROR; 147 147 148 VMMDECL(int) VMSetRuntimeError(PVM pVM, bool fFatal, const char *pszErrorID, const char *pszFormat, ...); 149 VMMDECL(int) VMSetRuntimeErrorV(PVM pVM, bool fFatal, const char *pszErrorID, const char *pszFormat, va_list args); 148 VMMDECL(int) VMSetRuntimeError(PVM pVM, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, ...); 149 VMMDECL(int) VMSetRuntimeErrorV(PVM pVM, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, va_list args); 150 151 /** @name VMSetRuntimeError fFlags 152 * When no flags are given the VM will continue running and it's up to the front 153 * end to take action on the error condition. 154 * 155 * @{ */ 156 /** The error is fatal. 157 * The VM is not in a state where it can be saved and will enter a state 158 * where it can no longer execute code. The caller must propagate status 159 * codes. */ 160 #define VMSETRTERR_FLAGS_FATAL RT_BIT_32(0) 161 /** Suspend the VM after, or if possible before, raising the error on EMT. The 162 * caller must propagate status codes. */ 163 #define VMSETRTERR_FLAGS_SUSPEND RT_BIT_32(1) 164 /** Don't wait for the EMT to handle the request. 165 * Only valid when on a worker thread and there is a high risk of a dead 166 * lock. Be careful not to flood the user with errors. */ 167 #define VMSETRTERR_FLAGS_NO_WAIT RT_BIT_32(2) 168 /** @} */ 150 169 151 170 … … 398 417 VMMR3DECL(int) VMR3AtRuntimeErrorRegister(PVM pVM, PFNVMATRUNTIMEERROR pfnAtRuntimeError, void *pvUser); 399 418 VMMR3DECL(int) VMR3AtRuntimeErrorDeregister(PVM pVM, PFNVMATRUNTIMEERROR pfnAtRuntimeError, void *pvUser); 400 VMMR3DECL( void)VMR3SetRuntimeErrorWorker(PVM pVM);419 VMMR3DECL(int) VMR3SetRuntimeErrorWorker(PVM pVM); 401 420 VMMR3DECL(int) VMR3ReqCall(PVM pVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...); 402 421 VMMR3DECL(int) VMR3ReqCallVoidU(PUVM pUVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...);
Note:
See TracChangeset
for help on using the changeset viewer.