Logo Search packages:      
Sourcecode: virtualbox-ose version File versions

Thread types. Besides identifying the purpose of the thread, the thread type is used to select the scheduling properties.

The types in are placed in a rough order of ascending priority.

Enumerator:
RTTHREADTYPE_INVALID  Invalid type.
RTTHREADTYPE_INFREQUENT_POLLER  Infrequent poller thread. This type of thread will sleep for the most of the time, and do infrequent polls on resources at 0.5 sec or higher intervals.
RTTHREADTYPE_MAIN_HEAVY_WORKER  Main heavy worker thread. Thread of this type is driving asynchronous tasks in the Main API which takes a long time and might involve a bit of CPU. Like for instance creating a fixed sized VDI.
RTTHREADTYPE_EMULATION  The emulation thread type. While being a thread with very high workload it still is vital that it gets scheduled frequently. When possible all other thread types except DEFAULT and GUI should interrupt this one ASAP when they become ready.
RTTHREADTYPE_DEFAULT  The default thread type. Since it doesn't say much about the purpose of the thread nothing special is normally done to the scheduling. This type should be avoided. The main thread is registered with default type during RTR3Init() and that's what the default process priority is derived from.
RTTHREADTYPE_GUI  The GUI thread type The GUI normally have a low workload but is frequently scheduled to handle events. When possible the scheduler should not leave threads of this kind waiting for too long (~50ms).
RTTHREADTYPE_MAIN_WORKER  Main worker thread. Thread of this type is driving asynchronous tasks in the Main API. In most cases this means little work an a lot of waiting.
RTTHREADTYPE_VRDP_IO  VRDP I/O thread. These threads are I/O threads in the RDP server will hang around waiting for data, process it and pass it on.
RTTHREADTYPE_DEBUGGER  The debugger type. Threads involved in servicing the debugger. It must remain responsive even when things are running wild in.
RTTHREADTYPE_MSG_PUMP  Message pump thread. Thread pumping messages from one thread/process to another thread/process. The workload is very small, most of the time it's blocked waiting for messages to be procduced or processed. This type of thread will be favored after I/O threads.
RTTHREADTYPE_IO  The I/O thread type. Doing I/O means shuffling data, waiting for request to arrive and for them to complete. The thread should be favored when competing with any other threads except timer threads.
RTTHREADTYPE_TIMER  The timer thread type. A timer thread is mostly waiting for the timer to tick and then perform a little bit of work. Accuracy is important here, so the thread should be favoured over all threads. If premention can be configured at thread level, it could be made very short.
RTTHREADTYPE_END  Only used for validation.

Definition at line 90 of file thread.h.

{
    /** Invalid type. */
    RTTHREADTYPE_INVALID = 0,
    /** Infrequent poller thread.
     * This type of thread will sleep for the most of the time, and do
     * infrequent polls on resources at 0.5 sec or higher intervals.
     */
    RTTHREADTYPE_INFREQUENT_POLLER,
    /** Main heavy worker thread.
     * Thread of this type is driving asynchronous tasks in the Main
     * API which takes a long time and might involve a bit of CPU. Like
     * for instance creating a fixed sized VDI.
     */
    RTTHREADTYPE_MAIN_HEAVY_WORKER,
    /** The emulation thread type.
     * While being a thread with very high workload it still is vital
     * that it gets scheduled frequently. When possible all other thread
     * types except DEFAULT and GUI should interrupt this one ASAP when
     * they become ready.
     */
    RTTHREADTYPE_EMULATION,
    /** The default thread type.
     * Since it doesn't say much about the purpose of the thread
     * nothing special is normally done to the scheduling. This type
     * should be avoided.
     * The main thread is registered with default type during RTR3Init()
     * and that's what the default process priority is derived from.
     */
    RTTHREADTYPE_DEFAULT,
    /** The GUI thread type
     * The GUI normally have a low workload but is frequently scheduled
     * to handle events. When possible the scheduler should not leave
     * threads of this kind waiting for too long (~50ms).
     */
    RTTHREADTYPE_GUI,
    /** Main worker thread.
     * Thread of this type is driving asynchronous tasks in the Main API.
     * In most cases this means little work an a lot of waiting.
     */
    RTTHREADTYPE_MAIN_WORKER,
    /** VRDP I/O thread.
     * These threads are I/O threads in the RDP server will hang around
     * waiting for data, process it and pass it on.
     */
    RTTHREADTYPE_VRDP_IO,
    /** The debugger type.
     * Threads involved in servicing the debugger. It must remain
     * responsive even when things are running wild in.
     */
    RTTHREADTYPE_DEBUGGER,
    /** Message pump thread.
     * Thread pumping messages from one thread/process to another
     * thread/process. The workload is very small, most of the time
     * it's blocked waiting for messages to be procduced or processed.
     * This type of thread will be favored after I/O threads.
     */
    RTTHREADTYPE_MSG_PUMP,
    /** The I/O thread type.
     * Doing I/O means shuffling data, waiting for request to arrive and
     * for them to complete. The thread should be favored when competing
     * with any other threads except timer threads.
     */
    RTTHREADTYPE_IO,
    /** The timer thread type.
     * A timer thread is mostly waiting for the timer to tick
     * and then perform a little bit of work. Accuracy is important here,
     * so the thread should be favoured over all threads. If premention can
     * be configured at thread level, it could be made very short.
     */
    RTTHREADTYPE_TIMER,
    /** Only used for validation. */
    RTTHREADTYPE_END
} RTTHREADTYPE;


Generated by  Doxygen 1.6.0   Back to index