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.


f3b21a0c785538e52ed3bb775de73dc855c5ce7f
[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 _V3VEE_
15 //#include <palacios/vmm_ringbuffer.h>
16 #undef _V3VEE_
17
18 #define STREAM_BUF_SIZE 1024
19 #define STREAM_NAME_LEN 128
20
21 struct stream_buffer {
22     char name[STREAM_NAME_LEN];
23     struct ringbuf * buf;
24
25     wait_queue_head_t intr_queue;
26     spinlock_t lock;
27
28     struct v3_guest * guest;
29     struct list_head stream_node;
30 };
31
32
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);
38
39 struct stream_buffer * find_stream_by_name(struct v3_guest * guest, const char * name);
40
41 #endif
42