VirtualBox

Changeset 39500 in vbox for trunk/include/iprt/req.h


Ignore:
Timestamp:
Dec 1, 2011 8:26:48 PM (13 years ago)
Author:
vboxsync
Message:

RTReq: More refactoring.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/req.h

    r39498 r39500  
    109109typedef struct RTREQ
    110110{
     111    /** Magic number (RTREQ_MAGIC). */
     112    uint32_t                u32Magic;
     113    /** Set if the event semaphore is clear. */
     114    volatile bool           fEventSemClear;
     115    /** Set if pool, clear if queue. */
     116    volatile bool           fPoolOrQueue;
     117    /** IPRT status code for the completed request. */
     118    volatile int32_t        iStatus;
     119    /** Request state. */
     120    volatile RTREQSTATE     enmState;
     121
    111122    /** Pointer to the next request in the chain. */
    112123    struct RTREQ * volatile pNext;
    113     /** Pointer to the queue this packet belongs to. */
    114     RTREQQUEUE              hQueue;
    115     /** Request state. */
    116     volatile RTREQSTATE     enmState;
    117     /** iprt status code for the completed request. */
    118     volatile int            iStatus;
     124
     125    union
     126    {
     127        /** Pointer to the pool this packet belongs to. */
     128        RTREQPOOL           hPool;
     129        /** Pointer to the queue this packet belongs to. */
     130        RTREQQUEUE          hQueue;
     131    } uOwner;
     132
    119133    /** Requester event sem.
    120134     * The request can use this event semaphore to wait/poll for completion
     
    122136     */
    123137    RTSEMEVENT              EventSem;
    124     /** Set if the event semaphore is clear. */
    125     volatile bool           fEventSemClear;
    126138    /** Flags, RTREQ_FLAGS_*. */
    127     unsigned                fFlags;
     139    uint32_t                fFlags;
    128140    /** Request type. */
    129141    RTREQTYPE               enmType;
     
    137149            PFNRT               pfn;
    138150            /** Number of arguments. */
    139             unsigned            cArgs;
     151            uint32_t            cArgs;
    140152            /** Array of arguments. */
    141153            uintptr_t           aArgs[64];
Note: See TracChangeset for help on using the changeset viewer.

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