Check if the queue of alerts is empty. @return Whether or not the alerts queue is empty. */
| 104 | @return Whether or not the alerts queue is empty. |
| 105 | */ |
| 106 | BOOLEAN |
| 107 | AlertQueue::IsQueueEmpty ( |
| 108 | VOID |
| 109 | ) |
| 110 | { |
| 111 | BOOLEAN empty; |
| 112 | KIRQL oldIrql; |
| 113 | |
| 114 | ExAcquireSpinLock(this->alertsLock, &oldIrql); |
| 115 | empty = IsListEmpty(RCAST<PLIST_ENTRY>(&this->alertsHead)); |
| 116 | ExReleaseSpinLock(this->alertsLock, oldIrql); |
| 117 | |
| 118 | return empty; |
| 119 | } |
| 120 | |
| 121 | |
| 122 | /** |