Synchronize with Driver loading/Unloading

Driver間的互相同步(通知?),是用 MessageQueue。

每一個driver,由device manager 管理(load)的driver,可以宣告一個自己的GUID。
然後Device Manager 在loading/unloading 這個driver時,會AdvertiseInterface( )。

需要知道這些動作的其他driver,ap,可以create 一個message queue,請device manager在AdvertiseInterface時將對應的message放到queue中 。

這樣需要被通知的driver, ap就可以利用這個message queue來得知該driver load/unload的狀態(時機)

msgQ = CreateMessasgeQueue( ).
RequestDeviceNotification( GUID_XXX, msgQ,,,)
WaitSingleEvent(msgQ...)
ReadMessageQueue(msgQ, buf....)
buf->....
記得在不需要通知時,要StopDeviceNotification。和 CloseMsgQueue。

相关文章:

  • 2022-01-23
  • 2022-12-23
  • 2021-11-29
  • 2022-12-23
  • 2021-08-25
  • 2021-08-02
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-29
  • 2022-02-02
  • 2021-10-26
  • 2021-10-10
相关资源
相似解决方案