Hi,
I am developing a filesystem filter driver, I have it to the
point now where I am recording filesystem events by
storing them in a queue, which is then processed (and emptied)
by a system worker thread.

Currently I am recording these events in the dispatch routine,
to synchronize with the worker thread I am acquiring a spinlock
(which the worker thread also has to acquire).

So just a couple of basic questions:

The dispatch routine will execute at PASSIVE_LEVEL, right?
which means that using spinlocks is perhaps overkill?

Can I use some other synchronization object, maybe mutexes,
resources or critical sections? This would be better for me because
then none of my code executes at DISPATCH_LEVEL whilst the
lock is held, and I can work with pagable memory no problems.

Assuming mutexes/whatever are OK, do I have any worries using
them in a filesystem filter - are there any issues regarding blocking
APC delivery - i.e. being alertable/not alertable??

Finally, what would the be the most appropriate sync object? I really
can't decide between mutex/event/critical section etc..

Thanks,
James