Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

thread.c File Reference

Common functions für initialization the WDM and NT4 driver. More...

#include <wdm.h>
#include "cbm_driver.h"

Go to the source code of this file.

Functions

NTSTATUS cbm_start_thread (IN PDEVICE_EXTENSION Pdx)
 Start the worker thread.
VOID cbm_stop_thread (IN PDEVICE_EXTENSION Pdx)
 Stop the worker thread.
VOID cbm_thread (IN PVOID Context)
 The thread function.


Detailed Description

Common functions für initialization the WDM and NT4 driver.

**************************************************************

Author:
Spiro Trikaliotis
Version:
Id
thread.c,v 1.12 2006/02/24 12:01:20 trikalio Exp


Definition in file thread.c.


Function Documentation

NTSTATUS cbm_start_thread IN PDEVICE_EXTENSION  Pdx  ) 
 

Start the worker thread.

This function start the worker thread.

Parameters:
Pdx Pointer to a DEVICE_EXTENSION structure.
Returns:
If the routine succeeds, it returns STATUS_SUCCESS. Otherwise, it return one of the error status values.
Todo:
Replace Pdx->QuitThread with a event for quitting

Definition at line 35 of file thread.c.

References cbm_thread(), DBG_ASSERT, DBG_ERROR, DBG_PREFIX, FUNC_ENTER, LogErrorString, and PERF_EVENT_THREAD_START_SCHED.

Referenced by AddDeviceCommonInit().

VOID cbm_stop_thread IN PDEVICE_EXTENSION  Pdx  ) 
 

Stop the worker thread.

This function stops the worker thread.

Parameters:
Pdx Pointer to a DEVICE_EXTENSION structure.
Returns:
If the routine succeeds, it returns STATUS_SUCCESS. Otherwise, it return one of the error status values.

Definition at line 118 of file thread.c.

References DBG_ASSERT, FUNC_ENTER, FUNC_LEAVE, PERF_EVENT_THREAD_STOP_SCHED, and QueueSignal().

Referenced by DriverUnload().

VOID cbm_thread IN PVOID  Context  ) 
 

The thread function.

This function is the function of the thread itself. It polls the QUEUE and executed the IRPs which are on it.

Parameters:
Context Pointer to the thread context. This is a PDX in reality.

Definition at line 166 of file thread.c.

References FUNC_ENTER, FUNC_LEAVE, PERF_EVENT_THREAD_POLL, PERF_EVENT_THREAD_START_EXEC, PERF_EVENT_THREAD_STOP_EXEC, and QueuePoll().

Referenced by cbm_start_thread().


Generated on Sun Apr 30 18:46:16 2006 for opencbm by  doxygen 1.4.2