Changeset 39504 in vbox for trunk/src/VBox/Runtime/include
- Timestamp:
- Dec 1, 2011 9:39:09 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/include/internal/req.h
r39500 r39504 30 30 #include <iprt/types.h> 31 31 32 32 33 RT_C_DECLS_BEGIN 34 35 /** 36 * Request state. 37 */ 38 typedef enum RTREQSTATE 39 { 40 /** The state is invalid. */ 41 RTREQSTATE_INVALID = 0, 42 /** The request have been allocated and is in the process of being filed. */ 43 RTREQSTATE_ALLOCATED, 44 /** The request is queued by the requester. */ 45 RTREQSTATE_QUEUED, 46 /** The request is begin processed. */ 47 RTREQSTATE_PROCESSING, 48 /** The request is completed, the requester is begin notified. */ 49 RTREQSTATE_COMPLETED, 50 /** The request packet is in the free chain. (The requester */ 51 RTREQSTATE_FREE 52 } RTREQSTATE; 53 54 55 /** 56 * RT Request packet. 57 * 58 * This is used to request an action in the queue handler thread. 59 */ 60 struct RTREQ 61 { 62 /** Magic number (RTREQ_MAGIC). */ 63 uint32_t u32Magic; 64 /** Set if the event semaphore is clear. */ 65 volatile bool fEventSemClear; 66 /** Set if pool, clear if queue. */ 67 volatile bool fPoolOrQueue; 68 /** IPRT status code for the completed request. */ 69 volatile int32_t iStatusX; 70 /** Request state. */ 71 volatile RTREQSTATE enmState; 72 73 /** Pointer to the next request in the chain. */ 74 struct RTREQ * volatile pNext; 75 76 union 77 { 78 /** Pointer to the pool this packet belongs to. */ 79 RTREQPOOL hPool; 80 /** Pointer to the queue this packet belongs to. */ 81 RTREQQUEUE hQueue; 82 } uOwner; 83 84 /** Requester event sem. 85 * The request can use this event semaphore to wait/poll for completion 86 * of the request. 87 */ 88 RTSEMEVENT EventSem; 89 /** Flags, RTREQ_FLAGS_*. */ 90 uint32_t fFlags; 91 /** Request type. */ 92 RTREQTYPE enmType; 93 /** Request specific data. */ 94 union RTREQ_U 95 { 96 /** RTREQTYPE_INTERNAL. */ 97 struct 98 { 99 /** Pointer to the function to be called. */ 100 PFNRT pfn; 101 /** Number of arguments. */ 102 uint32_t cArgs; 103 /** Array of arguments. */ 104 uintptr_t aArgs[64]; 105 } Internal; 106 } u; 107 }; 108 33 109 34 110 /**
Note:
See TracChangeset
for help on using the changeset viewer.