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"
14 #define STREAM_BUF_SIZE 1024
15 #define STREAM_NAME_LEN 128
17 struct stream_buffer {
18 char name[STREAM_NAME_LEN];
21 wait_queue_head_t intr_queue;
24 struct v3_guest * guest;
25 struct list_head stream_node;
29 void palacios_init_stream(void);
30 void palacios_deinit_stream(void);
31 int stream_enqueue(struct stream_buffer * stream, char * buf, int len);
32 int stream_dequeue(struct stream_buffer * stream, char * buf, int len);
33 int stream_datalen(struct stream_buffer * stream);
35 struct stream_buffer * find_stream_by_name(struct v3_guest * guest, const char * name);