IoSetCancelRoutine

Hi there,

Does anybody know if IoSetCancelRoutine() can be run at DISPATCH_LEVEL ?

Are there any limitations using it ?
Is there any harm in nullifying the CancelRoutine field at the Irp
before completing it ?

thanks,

dubi

IoSetCancelRoutine is a macro:

#define IoSetCancelRoutine( Irp, NewCancelRoutine ) ( (PDRIVER_CANCEL) InterlockedExchangePointer( (PVOID *)
&(Irp)->CancelRoutine, (PVOID) (NewCancelRoutine) ) )

InterlockedExchangePointer can be called at arbitrary IRQL in a safe
fashion, so the answer to your question would be “yes, it can be run at
DISPATCH_LEVEL”. Provided that the code within which the macro is compiled
is non-paged, that is.

Regards,

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: dubi@il.ibm.com [mailto:dubi@il.ibm.com]
Sent: Monday, June 12, 2000 9:56 AM
To: File Systems Developers
Subject: [ntfsd] IoSetCancelRoutine

Hi there,

Does anybody know if IoSetCancelRoutine() can be run at DISPATCH_LEVEL ?

Are there any limitations using it ?
Is there any harm in nullifying the CancelRoutine field at the Irp
before completing it ?

thanks,

dubi


You are currently subscribed to ntfsd as: xxxxx@osr.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)