2 * Palacios Stream interface
6 #ifndef __PALACIOS_STREAM_H__
7 #define __PALACIOS_STREAM_H__
9 #include <linux/spinlock.h>
10 #include <linux/interrupt.h>
12 #include "palacios-ringbuffer.h"
15 //#include <palacios/vmm_ringbuffer.h>
18 #define STREAM_BUF_SIZE 1024
19 #define STREAM_NAME_LEN 128
21 struct stream_buffer {
22 char name[STREAM_NAME_LEN];
25 wait_queue_head_t intr_queue;
28 struct v3_guest * guest;
29 struct list_head stream_node;
33 void palacios_init_stream(void);
34 void palacios_deinit_stream(void);
35 int stream_enqueue(struct stream_buffer * stream, char * buf, int len);
36 int stream_dequeue(struct stream_buffer * stream, char * buf, int len);
37 int stream_datalen(struct stream_buffer * stream);
39 struct stream_buffer * find_stream_by_name(struct v3_guest * guest, const char * name);