hyperv/vmbus: Allow driver to inject synchronous task into channel taskq.
MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8208
This commit is contained in:
parent
eb46c98711
commit
cca23e7c3c
@ -117,6 +117,7 @@ struct vmbus_chan_br {
|
||||
|
||||
struct vmbus_channel;
|
||||
struct hyperv_guid;
|
||||
struct task;
|
||||
|
||||
typedef void (*vmbus_chan_callback_t)(struct vmbus_channel *, void *);
|
||||
|
||||
@ -134,6 +135,8 @@ int vmbus_chan_open_br(struct vmbus_channel *chan,
|
||||
int udlen, vmbus_chan_callback_t cb, void *cbarg);
|
||||
void vmbus_chan_close(struct vmbus_channel *chan);
|
||||
void vmbus_chan_intr_drain(struct vmbus_channel *chan);
|
||||
void vmbus_chan_run_task(struct vmbus_channel *chan,
|
||||
struct task *task);
|
||||
|
||||
int vmbus_chan_gpadl_connect(struct vmbus_channel *chan,
|
||||
bus_addr_t paddr, int size, uint32_t *gpadl);
|
||||
|
@ -1713,3 +1713,11 @@ vmbus_chan_rx_empty(const struct vmbus_channel *chan)
|
||||
|
||||
return (vmbus_rxbr_empty(&chan->ch_rxbr));
|
||||
}
|
||||
|
||||
void
|
||||
vmbus_chan_run_task(struct vmbus_channel *chan, struct task *task)
|
||||
{
|
||||
|
||||
taskqueue_enqueue(chan->ch_tq, task);
|
||||
taskqueue_drain(chan->ch_tq, task);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user