req.h revision 4f3f6eb7aecf332523a1b44ff1e0cda506408273
b6b07507d11e2bea02bbba193ba367ea479a2fcfvboxsync * IPRT - Internal RTReq header.
b6b07507d11e2bea02bbba193ba367ea479a2fcfvboxsync * Copyright (C) 2006-2011 Oracle Corporation
b6b07507d11e2bea02bbba193ba367ea479a2fcfvboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
b6b07507d11e2bea02bbba193ba367ea479a2fcfvboxsync * available from http://www.virtualbox.org. This file is free software;
b6b07507d11e2bea02bbba193ba367ea479a2fcfvboxsync * you can redistribute it and/or modify it under the terms of the GNU
b6b07507d11e2bea02bbba193ba367ea479a2fcfvboxsync * General Public License (GPL) as published by the Free Software
b6b07507d11e2bea02bbba193ba367ea479a2fcfvboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
b6b07507d11e2bea02bbba193ba367ea479a2fcfvboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
b6b07507d11e2bea02bbba193ba367ea479a2fcfvboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
b6b07507d11e2bea02bbba193ba367ea479a2fcfvboxsync * The contents of this file may alternatively be used under the terms
b6b07507d11e2bea02bbba193ba367ea479a2fcfvboxsync * of the Common Development and Distribution License Version 1.0
b6b07507d11e2bea02bbba193ba367ea479a2fcfvboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
b6b07507d11e2bea02bbba193ba367ea479a2fcfvboxsync * VirtualBox OSE distribution, in which case the provisions of the
b6b07507d11e2bea02bbba193ba367ea479a2fcfvboxsync * CDDL are applicable instead of those of the GPL.
b6b07507d11e2bea02bbba193ba367ea479a2fcfvboxsync * You may elect to license modified versions of this file under the
b6b07507d11e2bea02bbba193ba367ea479a2fcfvboxsync * terms and conditions of either the GPL or the CDDL or both.
4f3f6eb7aecf332523a1b44ff1e0cda506408273vboxsync * Request state.
4f3f6eb7aecf332523a1b44ff1e0cda506408273vboxsync /** The state is invalid. */
4f3f6eb7aecf332523a1b44ff1e0cda506408273vboxsync /** The request have been allocated and is in the process of being filed. */
4f3f6eb7aecf332523a1b44ff1e0cda506408273vboxsync /** The request is queued by the requester. */
4f3f6eb7aecf332523a1b44ff1e0cda506408273vboxsync /** The request is begin processed. */
4f3f6eb7aecf332523a1b44ff1e0cda506408273vboxsync /** The request is completed, the requester is begin notified. */
4f3f6eb7aecf332523a1b44ff1e0cda506408273vboxsync /** The request packet is in the free chain. (The requester */
4f3f6eb7aecf332523a1b44ff1e0cda506408273vboxsync * RT Request packet.
4f3f6eb7aecf332523a1b44ff1e0cda506408273vboxsync * This is used to request an action in the queue handler thread.
4f3f6eb7aecf332523a1b44ff1e0cda506408273vboxsync /** Magic number (RTREQ_MAGIC). */
4f3f6eb7aecf332523a1b44ff1e0cda506408273vboxsync /** Set if the event semaphore is clear. */
4f3f6eb7aecf332523a1b44ff1e0cda506408273vboxsync volatile bool fEventSemClear;
4f3f6eb7aecf332523a1b44ff1e0cda506408273vboxsync /** Set if pool, clear if queue. */
4f3f6eb7aecf332523a1b44ff1e0cda506408273vboxsync volatile bool fPoolOrQueue;
4f3f6eb7aecf332523a1b44ff1e0cda506408273vboxsync /** IPRT status code for the completed request. */
4f3f6eb7aecf332523a1b44ff1e0cda506408273vboxsync /** Request state. */
4f3f6eb7aecf332523a1b44ff1e0cda506408273vboxsync /** Pointer to the next request in the chain. */
4f3f6eb7aecf332523a1b44ff1e0cda506408273vboxsync /** Pointer to the pool this packet belongs to. */
4f3f6eb7aecf332523a1b44ff1e0cda506408273vboxsync /** Pointer to the queue this packet belongs to. */
4f3f6eb7aecf332523a1b44ff1e0cda506408273vboxsync /** Requester event sem.
4f3f6eb7aecf332523a1b44ff1e0cda506408273vboxsync * The request can use this event semaphore to wait/poll for completion
4f3f6eb7aecf332523a1b44ff1e0cda506408273vboxsync * of the request.
4f3f6eb7aecf332523a1b44ff1e0cda506408273vboxsync /** Flags, RTREQ_FLAGS_*. */
4f3f6eb7aecf332523a1b44ff1e0cda506408273vboxsync /** Request type. */
4f3f6eb7aecf332523a1b44ff1e0cda506408273vboxsync /** Request specific data. */
4f3f6eb7aecf332523a1b44ff1e0cda506408273vboxsync /** RTREQTYPE_INTERNAL. */
4f3f6eb7aecf332523a1b44ff1e0cda506408273vboxsync /** Pointer to the function to be called. */
4f3f6eb7aecf332523a1b44ff1e0cda506408273vboxsync /** Number of arguments. */
4f3f6eb7aecf332523a1b44ff1e0cda506408273vboxsync /** Array of arguments. */
b6b07507d11e2bea02bbba193ba367ea479a2fcfvboxsync * Internal queue instance.
17ef1920962b3df57bf6d2704ced1586396d96f0vboxsync /** Magic value (RTREQQUEUE_MAGIC). */
17ef1920962b3df57bf6d2704ced1586396d96f0vboxsync /** Set if busy (pending or processing requests). */
17ef1920962b3df57bf6d2704ced1586396d96f0vboxsync bool volatile fBusy;
b6b07507d11e2bea02bbba193ba367ea479a2fcfvboxsync /** Head of the request queue. Atomic. */
b6b07507d11e2bea02bbba193ba367ea479a2fcfvboxsync /** The last index used during alloc/free. */
b6b07507d11e2bea02bbba193ba367ea479a2fcfvboxsync /** Number of free request packets. */
b6b07507d11e2bea02bbba193ba367ea479a2fcfvboxsync /** Array of pointers to lists of free request packets. Atomic. */
b6b07507d11e2bea02bbba193ba367ea479a2fcfvboxsync /** Requester event sem.
b6b07507d11e2bea02bbba193ba367ea479a2fcfvboxsync * The request can use this event semaphore to wait/poll for new requests.
b6b07507d11e2bea02bbba193ba367ea479a2fcfvboxsync/** Pointer to an internal queue instance. */