title: Thread should wait for commplete the device request in kext programming
body: <p>I am developing a device driver on mac. my question is how can we make a device request asynchronous to synchronous. like i send a send encapsulated command to device and get it response using get encapsulated command  after getting a notification on interrupt pipe.
  so how can i make my thread will wait until all above request is not completed (both send and get) . </p>