Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


7e9279f6f589d01a2529aeebeec75a48ceaa244a
[palacios.git] / linux_module / palacios-stream.h
1 /* 
2  * Palacios Stream interface
3  * (c) Lei Xia, 2010
4  */
5
6 #ifndef __PALACIOS_STREAM_H__
7 #define __PALACIOS_STREAM_H__
8
9 #include <linux/spinlock.h>
10 #include <linux/interrupt.h>
11 #include "palacios.h"
12 #include "palacios-ringbuffer.h"
13
14 #define STREAM_BUF_SIZE 1024
15 #define STREAM_NAME_LEN 128
16
17 struct stream_buffer {
18     char name[STREAM_NAME_LEN];
19     struct ringbuf * buf;
20
21     wait_queue_head_t intr_queue;
22     spinlock_t lock;
23
24     struct v3_guest * guest;
25     struct list_head stream_node;
26 };
27
28
29 void palacios_init_stream(void);
30 int stream_enqueue(struct stream_buffer * stream, char * buf, int len);
31 int stream_dequeue(struct stream_buffer * stream, char * buf, int len);
32 int stream_datalen(struct stream_buffer * stream);
33
34 struct stream_buffer * find_stream_by_name(struct v3_guest * guest, const char * name);
35
36 #endif
37