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.


Merge branch 'devel' of newskysaw.cs.northwestern.edu:/home/palacios/palacios into...
[palacios.git] / linux_module / util-ringbuffer.h
1 /*
2  * Ringbuffer 
3  * (c) Lei Xia  2010
4  */
5  
6
7 #ifndef __PALACIOS_RING_BUFFER_H__
8 #define __PALACIOS_RING_BUFFER_H__
9
10 struct ringbuf {
11     unsigned char * buf;
12     unsigned int size;
13
14     unsigned int start;
15     unsigned int end;
16     unsigned int current_len;
17 };
18
19
20 struct ringbuf * create_ringbuf(unsigned int size);
21 void free_ringbuf(struct ringbuf * ring);
22 int ringbuf_read(struct ringbuf * ring, unsigned char * dst, unsigned int len);
23 int ringbuf_write(struct ringbuf * ring, unsigned char * src, unsigned int len);
24 int ringbuf_data_len(struct ringbuf * ring);
25
26 #endif
27