Home | History | Annotate | Download | only in qemu

Lines Matching defs:bh

76     QEMUBH **bh = opaque;
77 qemu_bh_delete(*bh);
78 qemu_free(bh);
88 QEMUBH **bh;
101 /* Schedule BH to run any queued AIO completions as soon as possible */
102 bh = qemu_malloc(sizeof(*bh));
103 *bh = qemu_bh_new(bh_run_aio_completions, bh);
104 qemu_bh_schedule(*bh);
129 QEMUBH *bh;
130 bh = qemu_mallocz(sizeof(QEMUBH));
131 bh->cb = cb;
132 bh->opaque = opaque;
133 bh->next = async_context->first_bh;
134 async_context->first_bh = bh;
135 return bh;
140 QEMUBH *bh, **bhp;
144 for (bh = async_context->first_bh; bh; bh = bh->next) {
145 if (!bh->deleted && bh->scheduled) {
146 bh->scheduled = 0;
147 if (!bh->idle)
149 bh->idle = 0;
150 bh->cb(bh->opaque);
157 bh = *bhp;
158 if (bh->deleted) {
159 *bhp = bh->next;
160 qemu_free(bh);
162 bhp = &bh->next;
168 void qemu_bh_schedule_idle(QEMUBH *bh)
170 if (bh->scheduled)
172 bh->scheduled = 1;
173 bh->idle = 1;
176 void qemu_bh_schedule(QEMUBH *bh)
178 if (bh->scheduled)
180 bh->scheduled = 1;
181 bh->idle = 0;
182 /* stop the currently executing CPU to execute the BH ASAP */
186 void qemu_bh_cancel(QEMUBH *bh)
188 bh->scheduled = 0;
191 void qemu_bh_delete(QEMUBH *bh)
193 bh->scheduled = 0;
194 bh->deleted = 1;
199 QEMUBH *bh;
201 for (bh = async_context->first_bh; bh; bh = bh->next) {
202 if (!bh->deleted && bh->scheduled) {
203 if (bh->idle) {