* Add a new queue to the global list. Fail if we're shutting down. */
| 124 | * Add a new queue to the global list. Fail if we're shutting down. |
| 125 | */ |
| 126 | static int |
| 127 | ald_add(struct alq *alq) |
| 128 | { |
| 129 | int error; |
| 130 | |
| 131 | error = 0; |
| 132 | |
| 133 | ALD_LOCK(); |
| 134 | if (ald_shutingdown) { |
| 135 | error = EBUSY; |
| 136 | goto done; |
| 137 | } |
| 138 | LIST_INSERT_HEAD(&ald_queues, alq, aq_link); |
| 139 | done: |
| 140 | ALD_UNLOCK(); |
| 141 | return (error); |
| 142 | } |
| 143 | |
| 144 | /* |
| 145 | * Remove a queue from the global list unless we're shutting down. If so, |