X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Futil-ringbuffer.h;h=051a4ffc15240bbdf78321783652bff5b30a170e;hb=d0aa5bd27c22a33f04f47363910f9773fdeab7eb;hp=eb39025ec90276630f1238683abd0da4566efbc5;hpb=276cfa264720edddc1677e35c6a300596965de7d;p=palacios.git diff --git a/linux_module/util-ringbuffer.h b/linux_module/util-ringbuffer.h index eb39025..051a4ff 100644 --- a/linux_module/util-ringbuffer.h +++ b/linux_module/util-ringbuffer.h @@ -1,26 +1,27 @@ -/* - * Ringbuffer Routines for VM - * (c) Lei Xia, 2010 - */ +/* + * Ringbuffer + * (c) Lei Xia 2010 + */ + -#ifndef __PALACIOS_RING_BUFFER_H__ -#define __PALACIOS_RING_BUFFER_H__ - -struct ringbuf { - unsigned char * buf; - unsigned int size; +#ifndef __PALACIOS_RING_BUFFER_H__ +#define __PALACIOS_RING_BUFFER_H__ - unsigned int start; - unsigned int end; - unsigned int current_len; +struct ringbuf { + unsigned char * buf; + unsigned int size; + + unsigned int start; + unsigned int end; + unsigned int current_len; }; - - -struct ringbuf * create_ringbuf(unsigned int size); -void free_ringbuf(struct ringbuf * ring); -int ringbuf_read(struct ringbuf * ring, unsigned char * dst, unsigned int len); -int ringbuf_write(struct ringbuf * ring, unsigned char * src, unsigned int len); -int ringbuf_data_len(struct ringbuf * ring); -#endif - + +struct ringbuf * create_ringbuf(unsigned int size); +void free_ringbuf(struct ringbuf * ring); +int ringbuf_read(struct ringbuf * ring, unsigned char * dst, unsigned int len); +int ringbuf_write(struct ringbuf * ring, unsigned char * src, unsigned int len); +int ringbuf_data_len(struct ringbuf * ring); + +#endif +