Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Home NTDEV
Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


Using Mutex and Events in UMDF

remyavu10remyavu10 Member Posts: 55
edited August 6 in NTDEV

I am just going through the OSR page https://www.osr.com/nt-insider/2011-issue2/basics-wdf-queues/

I read that "you can’t touch pagable memory or use Dispatcher Objects (such as mutexes and events) for synchronization within these callbacks" from below paragraph. Does the statement hold true for UMDf driver as well? Because, I am having UMDF Virtual Serial Driver and i am using Mutex and Events for synchronization and it is working (from with in the event callbacks).


It is extremely important to note that the EvtIoXxx Event Processing callbacks to your driver occur in an arbitrary process and thread context, and (by default) at an IRQL less than or equal to IRQL DISPATCH_LEVEL. That means you can’t know in advance what thread is running when one of your EvtIoXxx callbacks gets called, and also that (by default) you can’t touch pagable memory or use Dispatcher Objects (such as mutexes and events) for synchronization within these callbacks.

Comments

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Internals & Software Drivers 30 Nov 2020 LIVE ONLINE
Writing WDF Drivers 7 Dec 2020 LIVE ONLINE
Developing Minifilters Early 2021 LIVE ONLINE