From: Vodicka, Michal [mvodicka@rkk.cz] Sent: Thursday, March 08, 2001 7:34 PM To: NT Developers Interest List Subject: [ntdev] RE: synchronization problem It should work if you're running on passive level but remember you're blocking original requestor thread. In some cases it can cause funny deadlocks if continue in user mode. Other possibility: can you return pending status to original requestor and complete request later? If so, you don't need to wait, just send data to your app, return pending and complete processing when receive IRP with results. BTW, wouldn't be easier to move all user mode code to your driver? I always prefer this solution... Best regards, Michal Vodicka Veridicom (RKK - Skytale) [WWW: http://www.veridicom.com , http://www.skytale.com] > ---------- > From: Matteo Pelati[SMTP:matteo@dolce.it] > Reply To: NT Developers Interest List > Sent: Friday, March 09, 2001 1:06 AM > To: NT Developers Interest List > Subject: [ntdev] RE: synchronization problem > > Ok. > I've a packet of data in my driver. I received that packet with an > IOCTL/TDI > request. I've to process this packet, partly using kernel functions (in my > driver) and partly using my application's functions. Now, suppose I've to > pass that packet of data to my application up in user mode, so that the > app > can modify it and when it returns, depending how the packet has been > modified it can follow different paths. I use a pending (more than one if > necessary) to send data to user mode to my app...then I've to wait until > my > app completes the operation so i can receive the modified packet and > continue processing. So, I will have to wait until my application's > function > modify the data and complete the operation...that is, complete the > operation > and send down an IOCTL -> so, I'll have to wait for an IOCTL from my app. > My > question is how do i do that? The only thing thet come up to my mind righ > now is by creating an event object (I'm running at PASSIVE IRQL..so no > problem) before sending the request to user mode, that wait on that event. > When I will receive an IOCTL from the app, in my Dispatch function I can > set > the event to allow the code to continue...it should work... better ideas? > > Thanks > Matteo > > ----- Original Message ----- > From: "Vodicka, Michal" > To: "NT Developers Interest List" > Sent: Friday, March 09, 2001 12:43 AM > Subject: [ntdev] RE: synchronization problem > > > > It depends on the reason why and where you need wait. In some situations > you > > can just do nothing and continue processing when receive an IRP with > > results. If you have a worker thread, you can wait for an event and set > it > > in dispatch function when receive results. All depends on actual > conditions > > (IRQL...), write more details. > > > > Best regards, > > > > Michal Vodicka > > Veridicom > > (RKK - Skytale) > > [WWW: http://www.veridicom.com , http://www.skytale.com] > --- You are currently subscribed to ntdev as: GlennEverhart@FirstUSA.com To unsubscribe send a blank email to leave-ntdev-247T@lists.osr.com