阅读:1490回复:3
KeSetTimer的一个问题
前几天写一个miniport的driver,可是突然在KeSetTimer(¤t_session->rx_allow_timer,read_time,NULL)这里蓝屏,softice出来error是page fault(),当时我就觉得可能是哪个参数值错了,可是我用KeReadStateTimer(¤t_session->rx_allow_timer);来试过来,也没有出这个错,read_time=RtlConvertLongToLargeInteger(-10000000),也设置过了啊,为什么呢?请教一下大家?最后一个dpc函数应该可以null阿,而且我在其他地方也有这个函数,一样的调用都没有错,就这个地方,大家帮我想想
|
|
沙发#
发布于:2004-03-01 10:31
顶一下,没人遇到过么
|
|
板凳#
发布于:2004-03-01 11:12
顶一下,没人遇到过么 你的描述太简单了,很难判断。最好有代码,才好判断。 |
|
|
地板#
发布于:2004-03-01 12:50
void timer_rx_thread(IN PVOID arg)
{ BOOLEAN timer_status; LARGE_INTEGER read_time; iscsiConnection_t *current_connection; iscsiSession_t *current_session; read_time=RtlConvertLongToLargeInteger(-10000000); /* 1 seconds */ current_connection = (iscsiConnection_t *) arg; current_session = my_session(current_connection); while(1) { KeWaitForSingleObject(¤t_session->rx_allow_timer, Executive, KernelMode, FALSE, // alertable NULL ); KdPrint(("timer is running ***********************************************************\n")); // do something about timer_sign=1; KeSetEvent(¤t_connection->rx_read_allowed, IO_NO_INCREMENT, TRUE ); // timer_status = KeSetTimer(¤t_session->rx_allow_timer,read_time,NULL); } } 这就是那个线程的代码,但是在其他线程的kesettimer都没有导致page fault |
|