Changeset 19562 in vbox for trunk/src/VBox/Runtime/include
- Timestamp:
- May 10, 2009 9:44:16 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/include/internal/fileaio.h
r19166 r19562 36 36 37 37 /******************************************************************************* 38 * Structures and Typedefs * 39 *******************************************************************************/ 40 /** 41 * Defined request states. 42 */ 43 typedef enum RTFILEAIOREQSTATE 44 { 45 /** Prepared. */ 46 RTFILEAIOREQSTATE_PREPARED = 0, 47 /** Submitted. */ 48 RTFILEAIOREQSTATE_SUBMITTED, 49 /** Completed. */ 50 RTFILEAIOREQSTATE_COMPLETED, 51 /** Omni present 32bit hack. */ 52 RTFILEAIOREQSTATE_32BIT_HACK = 0x7fffffff 53 } RTFILEAIOREQSTATE; 54 55 /******************************************************************************* 38 56 * Defined Constants And Macros * 39 57 *******************************************************************************/ 58 59 /** Return true if the specified request is not valid, false otherwise. */ 60 #define RTFILEAIOREQ_IS_NOT_VALID(pReq) \ 61 (RT_UNLIKELY(!VALID_PTR(pReq) || (pReq->u32Magic != RTFILEAIOREQ_MAGIC))) 40 62 41 63 /** Validates a context handle and returns VERR_INVALID_HANDLE if not valid. */ … … 66 88 #define RTFILEAIOCTX_VALID_RETURN(pCtx) RTFILEAIOCTX_VALID_RETURN_RC((pCtx), VERR_INVALID_HANDLE) 67 89 90 /** Checks if a request is in the specified state and returns the specified rc if not. */ 91 #define RTFILEAIOREQ_STATE_RETURN_RC(pReq, State, rc) \ 92 do { \ 93 if (RT_UNLIKELY(pReq->enmState != RTFILEAIOREQSTATE_##State)) \ 94 return rc; \ 95 } while (0) 96 97 /** Checks if a request is not in the specified state and returns the specified rc if it is. */ 98 #define RTFILEAIOREQ_NOT_STATE_RETURN_RC(pReq, State, rc) \ 99 do { \ 100 if (RT_UNLIKELY(pReq->enmState == RTFILEAIOREQSTATE_##State)) \ 101 return rc; \ 102 } while (0) 103 104 /** Sets the request into a specific state. */ 105 #define RTFILEAIOREQ_SET_STATE(pReq, State) \ 106 do { \ 107 pReq->enmState = RTFILEAIOREQSTATE_##State; \ 108 } while (0) 109 110 68 111 __BEGIN_DECLS 69 112
Note:
See TracChangeset
for help on using the changeset viewer.